I am not sure about what you want to do...
Do you want to do a Public Static function???
If so... :
Static functions could be accessed without any instance, but the code you will put inside should not use any Non-Static objects
Ex:
add this some where in a . CS file (Imagine that it's in WebApplication1.WebForm1):
public static string ReturnString(){
return "A String";
}
This function will be accessible by any pages,classes of you application or any project using the WebApplication1 reference. To use the function, use this:
string result = WebApplication1.WebForm1.ReturnString();
Is that you searched for?
Thanks
Jonathan
|