Cannot create a new instance of an object.

Jun 14, 2012 at 8:09 PM

how can i create a new class instance from static main method? like this:

using System;
namespace TestProject
{
    class Test
    {
        static void Main()
        {  
            SubClass sb=new SubClass();
            Console.WriteLine(sb.TestMethod());
        }
    }

    class SubClass()
    {
        public SubClass()
        {
        }
       
        public int TestMethod()
        {
            return 5;
        }
    }
}