what is the difference between static class and normal class?

Posted by Phsika on Stack Overflow See other posts from Stack Overflow or by Phsika
Published on 2010-05-28T13:06:57Z Indexed on 2010/05/28 13:12 UTC
Read the original article Hit count: 173

Filed under:
|
|
|

when i prefer static or normal class? Or what is the difference between them?

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

namespace staticmethodlar
{
    class Program
    {
        static void Main(string[] args)
        {
            SinifA.method1();
        }
    }

    static class SinifA 
    {
       public static void method1()
        {
            Console.WriteLine("Deneme1");
        }
    }

    public static class SinifB
    {
        public static void method2()
        {
            Console.WriteLine("Deneme2");
        }
    }
    public class sinifC
    {
       public void method3()
        {
            Console.WriteLine("Deneme3");
        }
    }

   public class sinifD : sinifC
    {
        void method4()
        {
            Console.WriteLine("Deneme4");
        }

        sinifC sinifc = new sinifC();  // i need to use it:)


    }
}

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET