39.sealed class can't inherite or override
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace seald_class.cs
{
public sealed class classsealed // it can't inheritaed and override
{
int no = 7;
public void display()
{
Console.WriteLine("Vakue of A : " + no);
}
}
class Program
{
static void Main(string[] args)
{
classsealed obj = new classsealed();
obj.display();
Console.Read();
}
}
}
OUTPUT:
Value of A : 7
Comments
Post a Comment