C# Interview Questions and Answers (958) - Page 42

In C#, constructors used in the class which has only static members?

NOTE: This is objective type question, Please click question title for correct answer.
In C#, the constructors used to initialize the static data are?

NOTE: This is objective type question, Please click question title for correct answer.
In C#, the keyword used to do a type conversion in a class or struct is?

NOTE: This is objective type question, Please click question title for correct answer.
In C#, the property that states the behavior of an object is?

NOTE: This is objective type question, Please click question title for correct answer.
In C#, Method overloading is an example for?

NOTE: This is objective type question, Please click question title for correct answer.
In C#, operator overloading is an example of?

NOTE: This is objective type question, Please click question title for correct answer.
In C#, Method overriding is an example for?

NOTE: This is objective type question, Please click question title for correct answer.
In C#, virtual functions are example for?

NOTE: This is objective type question, Please click question title for correct answer.
In C#, the process of linking a method with an object at compile time is known as?

NOTE: This is objective type question, Please click question title for correct answer.
In C#, the process of linking a method to an object at runtime is known as?

NOTE: This is objective type question, Please click question title for correct answer.
In C#, a type used to encapsulate the small groups of variables is?

NOTE: This is objective type question, Please click question title for correct answer.
In C#, the type used to provide the specifications to its members instead of implementing them is?

NOTE: This is objective type question, Please click question title for correct answer.
In C#, the concept of implementing two interfaces with same member signatures without collisions in them is called as?

NOTE: This is objective type question, Please click question title for correct answer.
In C#, in order to override any type of an interface, it must be called with ____ in the base class?

NOTE: This is objective type question, Please click question title for correct answer.
In C#, what is the benefit of re-implementing interfaces?

NOTE: This is objective type question, Please click question title for correct answer.
In C#, the keyword which allows the methods to receive variable number of parameters?

NOTE: This is objective type question, Please click question title for correct answer.
What do you mean by 'global' keyword in C#?

global is the C#'s contextual keyword which refers to the global namespace. It is used to solve the problems that we might get while redefining types.

If it is places before '::' operator, then it is referring to the global namespace which is the C#'s default namespace.

Example,
class MyClass : global::MySec { }

In C#, what do you mean by 'yield' keyword?

yield is the contextual keyword of C# which is used as an iterator. By using this keyword, there is no need to have an explit extra class when we deal with IEnumerable and IEnumarator patterns.

yield actually interacts with the foreach loop.

Example,
yield return someVar; // returning expression someVar

What is the use of 'orderby' keyword in C#?

orderby (clause) is the C#'s contextual keyword used to define sorting, either ascending or descending to a query.
So, it defines a sorting algorithm to the result that is being queried.
ascending is the default sorting order of orderby clause. We have to make it to descending to achieve elements in descending order.
In C#, which of the below keyword used to filter the elements from a collection is?

NOTE: This is objective type question, Please click question title for correct answer.
Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories