- If you made class as sealed, we can create instance for the class.
- We can access the members.
- We can't derive sealed class from other classes.
namespace ConsoleApplication6
{
sealed class Program
{
void menu()
{
Console.WriteLine("Hello");
Console.ReadLine();
}
static void Main(string[] args)
{
Program pgm=new Program();
pgm.menu();
}
}
}
No comments:
Post a Comment