Mayfield Global Knowledge Center



What are Static Members in C#?

Static Members allow you to call the member without creating an instance of the class that contains it. You can create a static member by marking the method as static.
public class MyClass
{
     public static void SpRedirect()
     {
           Response.Redirect("http://kb.mayfieldglobal.com");
     }
}

You may now call the SpRedirect() method without instantiating the entire class.

Would you like to...


del.icio.us

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favoritesAdd to favorites

User Opinions (4 votes)

100% thumbs up 0% thumbs down

How would you rate this answer?

Helpful
Not helpful
Thank you for rating this answer.

Visitor Comments

No visitor comments posted. Post a comment

Related Questions

Attachments

No attachments were found.