Home / MCQ Bank / Computer
Computer Miscellaneous In C Sharp Difficulty: Medium

What does the "sealed" keyword do in C#?

Select the correct option to test your answer:

More Computer Questions

Which of these access specifiers must be used for main() method? The method used to write a single byte to an output stream? What will be the output of the following C# code? class number { private int num1; private int num2; public int anumber { get { return num1; } set { num1 = value; } } public int anumber1 { get { return num2; } set { num2 = value; } } } class Program { public static void Main(string[] args) { number p = new number(); p.anumber = 20; number k = new number(); k.anumber1 = 40; int m = p.anumber; int t = k.anumber1; int r = p.anumber + k.anumber1; System.Console.WriteLine("number1 = " +m); System.Console.WriteLine("number2 = " +t); System.Console.WriteLine("sum = " +r); System.Console.ReadLine(); } } What will be the output of the following C# code? class a { public void fun() { Console.WriteLine("base method"); } } class b: a { public new void fun() { Console.WriteLine(" derived method "); } } class Program { static void Main(string[] args) { b k = new b(); k.fun(); Console.ReadLine(); } } What is the use of Cascade Delete Option in MS Access?