C# does not support an explicit fall through for case blocks. The following code is not legal and will not compile in C#: switch(x){case 0:// do somethingcase 1:// do something in common with 0default://
Latest Answer : c# switch allows fall through if and only if in empty case. as long as there is a statement in the case it must use break or go to to jump out of the case. ...
The most common problem is that you used a lowercase 'm' when defining the Main method. The correct way to implement the entry point is as follows: class test {static void Main(string[] args)
Latest Answer : class test { public test() { } public static void Main(string[] args) {} } modifier for Main is public and inside the clas default constructor is necessary ...
From language spec:The list of similarities between classes and structs is as follows. Longstructs can implement interfaces and can have the same kinds of members as classes. Structs differ from classes
Latest Answer : Following are the main points of difference between classes and structs in C#:Value type vs Reference type: Structs are value type and classes are reference type. Whenever a struct object is assigned to another struct object a copy is created. In case ...
StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it is being operated on, a new instance is created.
Latest Answer : Ans:Yes,it is right.Answer: StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it is being operated on, a new instance is created. function checkf(form) { var f = document.form1;if ...
In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true.
Latest Answer : Ans:In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true. ...
Positive test cases (correct data, correct output), negative test cases (broken or missing data, proper handling), exception test cases (exceptions are thrown and caught properly).
Latest Answer : Ans:Yes,It is corect.Positive test cases (correct data, correct output), negative test cases (broken or missing data, proper handling), exception test cases (exceptions are thrown and caught properly). ...
.NET FRAMEWORK1. What is .NET Framework?The .NET Framework has two main components: the common language runtime and the .NET Framework class library.You can think of the runtime as an agent that manages
Skill/Topic: BeginnerA) csc.exeB) csharp.exeC) compilescs.exe
Latest Answer : The ans is csc.exe ...
Skill/Topic: BeginnerA) main()B) Main()C) Enter()
Latest Answer : Ans:B) Main() ...
Skill/Topic: IntermediateA) ClassB) NamespaceC) Program
Latest Answer : Namespace ...