We provide IT Services

Register Now Click On

Read More Tutorials Click On

Post Page Advertisement [Top]


static is a keyword, Static class Does not create any type of Object and Static Class .

Static Class always call same as the class name.(static   method)

Static Class does not depend any object.

Static Class created by only Static Contractor.

(static Varibal)

Example of Static Class:-

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace What_is_static_class
{
    static class Programmer
    {
        
        public static void show()
        {
            Console.WriteLine("Hello Rock Programmer");
        }
    }
    class Rock
    {
       public static void Main(string[] args)
        {
            Programmer.show();
            Console.ReadKey();
        }
    }

}

Output of:-





No comments:

Post a Comment

| Designed by Rockprogrammer