Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

class definition

Status
Not open for further replies.

smsinger3

Programmer
Oct 5, 2000
192
US
Is it possible to define a method or property in a class, but not refer to the class? For Example...

--- the class ----------------------
Public class MiscFunctions
public function StripFilename(a as string) as string
...
...
return (...)
end function
End Class

---another class module-------------------------
..
public sub Writefile()
'normally, this would be objMiscFunction.StripFileName("\\server\dir1\sub\filename.txt")
strFileName = StripFileName("\\server\dir1\sub\filename.txt")
end sub
----------------------------------------------------


The reason why I want to do this is that I am converting some classic asp code to asp.net and I thought this would be the easiest way to convert many miscellenous functions. If I don't have to type the "objMiscFunction." then that is much less typing! I think this is a good idea, but I am open to other opinions!

Thanks,

SteveS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top