programming-examples/c-sharp/_Basic/C# Program to Create Sealed Class.cs
2019-11-15 12:59:38 +01:00

24 lines
394 B
C#

/*
* C# Program to Create Sealed Class
*/
using System;
sealed class SealedClass
{
public int x;
public int y;
}
class SealedTest
{
static void Main()
{
SealedClass sc = new SealedClass();
sc.x = 100;
sc.y = 180;
Console.WriteLine("x = {0}, y = {1}", sc.x, sc.y);
Console.ReadLine();
}
}
/*
x = 100 ,y = 180