How to define and use static method in static class in C#

1 Answer

0 votes
using System;

namespace ConsoleApplication_C_Sharp
{
    public static class Test
    {
        public static void method()
        {
            Console.WriteLine("method");
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            Test.method();
        }
    }
}


/*
run:
 
method

*/

 



answered Dec 31, 2016 by avibootz

Related questions

1 answer 205 views
1 answer 204 views
1 answer 215 views
1 answer 212 views
1 answer 187 views
1 answer 176 views
176 views asked Dec 31, 2016 by avibootz
...