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
--- 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