Wednesday, June 8, 2016

using sealed class in C#.Net

//sealed Class Simple Example
class A {}
sealed class B : A {}

--Sealed methods

class X
{
 protected virtual void First() { }
 protected virtual void Second() { }
}
class Y : X
{
 sealed protected override void First() {}
 protected override void Second() { }
}

No comments: