-----------------------------------------------------------
New Message on cochindotnet
-----------------------------------------------------------
From: VishalRJoshi
Message 1 in Discussion
Call to Static Methods
You cannot call static method of a class using the object of the class...
You would have to call it using the Class name itself..
eg.You cannot call base class's static method using base.StaticMethod();
that shall result into an error...
the way you do it is:
//Class having Static Method
public class MyClass
{
public static string StaticMethod()
{
return "[EMAIL PROTECTED]";
}
}
//Class using Static Method
public class ClientClass
{
public string GetHelpLineEmailId()
{
return MyClass.StaticMethod();
}
}
Vishal Joshi
Microsoft MVP .Net
If You Think YOU CAN... You Can...
http://VishalJoshi.Blogspot.com
http://www.microsoft.com/india/mvp/indiamvp.aspx
http://groups.msn.com/ChennaiNetUserGroup
http://groups.msn.com/CNUG-DAM
http://groups.msn.com/NetBloomingtonUserGroup
PS: To see archive of the previous tip visit my blog site (in signature)
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/CochinDotNet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]