
when a class defined as sealed its not possible to inherit its class and properties to the inherited class.Its also applicable to the class
properties.Even class defined as public its banned to inherit the class.
example
using System;
class Class1
{
static void Main(string[] args)
{
SealedClass sealedCls = new SealedClass();
int total = sealedCls.Add(4, 5);
Console.WriteLine("Total = " + total.ToString());
}
}
// Sealed class
sealed class SealedClass
{
public int Add(int x, int y)
{
return x + y;
}
}
Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/
Rajendra.prasad, if this helps please login to Mark As Answer. | Alert Moderator