Feeds:
Posts
Comments

Posts Tagged ‘static classes’

Static Classes

Static classes are classes that contain only static members. Following is an example of static class
    static class MyClass
    {
        private static string name = “venkat”;
 
        public static void Fun()
        {
            Console.WriteLine(“Fun here…”);
        }
 
        public static void MoreFun()
        {
            Console.WriteLine(“More Fun here…”);
        }
    }
Since this is a static class (can contain only static members), [...]

Read Full Post »