-
C# sealed variables
I have taken a windows application and a button control in it.I want to declare a variable as a sealed and use that variable with in same class as we cannot use in other class. class test { public sealed int x = 5; public void abc() { MessageBox.Show(x.ToString()); } } class best :test { ...
-
-
-
-
Which method is implicitly called when an object is created
A) Main MethodB) Constructor MethodC) Destructor MethodExplanation: Constructor is the method which is implicitly created when ever a class is instantiated
-
Which statement is invalid with regards to Constant
A) They must be initialized when they are declaredB) The value of the constant must be computable at compile timeC) Constants are not staticD) Constant is a variable whose value can be changed through out it’s life time when it is static.