Question - 15 : - What's the difference between const and readonly?
Answer - 15 : -
The readonly keyword is different from the const keyword. A const field can only be initialized at the declaration of the field. A readonly field can be initialized either at the declaration or in a constructor. Therefore, readonly fields can have different values depending on the constructor used. Also, while a const field is a compile-time constant, the readonly field can be used for runtime constants as in the following example:
public static readonly uint l1 = (uint) DateTime.Now.Ticks;
Question - 16 : - What does \a character do?
Answer - 16 : - On most systems, produces a rather annoying beep.
Question - 17 : - What happens when you encounter a continue statement inside the for loop?
Answer - 17 : -
The code for the rest of the loop is ignored, the control is transferred back to the beginning of the loop.
Question - 18 : - Why is it a bad idea to throw your own exceptions?
Answer - 18 : -
Well, if at that point you know that an error has occurred, then why not write the proper code to handle that error instead of passing a new Exception object to the catch block? Throwing your own exceptions signifies some design flaws in the project.
Question - 19 : - What's the difference between // comments, /* */ comments and /// comments?
Answer - 19 : -
Single-line, multi-line and XML documentation comments.
Question - 20 : - What Is Vb.net?
Answer - 20 : - Vb.net is a programming language that is available in Visual Studio. Net. It contains features of visual basic which is event based programming language and also includes object oriented concepts.
[VB.Net is a programming language which is an extension of Visual Basic to make it compliant to the Dot Net Framework. Also VB.Net is fully Object Oriented unlike Visual Basic and everything in VB.Net is an object. As it is compliant to the Dot Net Framework VB.Net can make full use of Framework Class Library provided by dot Net Framework