C#.Net Interview Question and Answers

81. What is the difference between CONST and READONLY?
  Both are meant for constant values. A const field can only be initialized at the declaration of the field. A readonly field can be initialized either at the declaration or.
82. Does C# have a throws clause?
  No, unlike Java, C# does not require (or even allow) the developer to specify the exceptions that a method can throw.
83. What are the different ways a method can be overloaded?
  Different parameter data types, different number of parameters, different order of parameters.
84. Do events have return type?
  No, events do not have return type.
85. What is event?
 
  • An event is an action performed based on another method of the program.
  • An event is a delegate type dass member that is used by an object or a class to provide a notification to other objects that an event has occurred.
  • An event can be declared with the help of the event keyword.