CSharp examples for Custom Type:sealed
C# provides the sealed keyword to prevent derivation from a class.
using System;//from w w w .j a v a 2s. c o m sealed public class number { private float pi; public number() { pi = 3.14159F; } public float PI { get { return pi; } } } class myApp { public static void Main() { number myNumbers = new number(); Console.WriteLine("PI = {0}", myNumbers.PI); } }