Quote Originally Posted by firoz.raj View Post
Can anyone tell me ???Why the following code is not working ?let me know some idea.

Code:
using System;
using System.Collections.Generic;
using System.Text;

namespace Example9
{
    class Program
    {
        static void Main(string[] args)
         {
           Public String Program();
           {
               Console.WriteLine("I am a Constructor");

               return;
           }
             
        }
    }
}
hay firoz.raj,
i believe here that you want to create a constructor.
the constructor must be with the same name of the class, in your case it will be Program.
you added method definition inside another method, and this is wrong.

please see this link
http://www.c-sharpcorner.com/UploadF...sInCSharp.aspx