CSharp examples for Custom Type:static
Create a Static Class and calls its method and property
using System;/*from w w w . j a v a2 s .c o m*/ public static class MyStaticClass { public static string getMessage() { return "This is a static member"; } public static string StaticProperty { get; set; } } class MainClass { static void Main(string[] args) { Console.WriteLine(MyStaticClass.getMessage()); // set and get the property MyStaticClass.StaticProperty = "this is the property value"; Console.WriteLine(MyStaticClass.StaticProperty); } }