C# (C Sharp) MCQs with answers Page - 17

Here, you will find a collection of MCQ questions on C# (C Sharp). Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

Q. Choose the namespace in which the interface IEnumerable is declared?

  • (A) System.Collections
  • (B) System.Collections.Generic
  • (C) Both a & b
  • (D) None of the mentioned

A

Admin • 833.24K Points
Coach

Q. Can we use linq to query against a DataTable?

  • (A) Yes
  • (B) No
  • (C) Situational
  • (D) None of the mentioned

A

Admin • 833.24K Points
Coach

Q. Select the namespace which should be included while making use of LINQ operations:

  • (A) System.Text
  • (B) System.Collections.Generic
  • (C) System.Linq
  • (D) None of the mentioned

A

Admin • 833.24K Points
Coach

Q. What is meant by the term generics?

  • (A) parameterized types
  • (B) class
  • (C) structure
  • (D) interface

A

Admin • 833.24K Points
Coach

Q. Are generics in C# are same as the generics in java and templates in C++?

  • (A) Yes
  • (B) No
  • (C) May be
  • (D) None of the mentioned

A

Admin • 833.24K Points
Coach

Q. Choose the advantages of using generics?

  • (A) Generics facilitate type safety
  • (B) Generics facilitate improved performance and reduced code
  • (C) Generics promote the usage of parameterized types
  • (D) All of the mentioned

A

Admin • 833.24K Points
Coach

Q. Which among the given classes present in System.Collection.Generic.namespace?

  • (A) Stack
  • (B) Tree
  • (C) Sorted Array
  • (D) All of the mentioned

A

Admin • 833.24K Points
Coach

Q. Which feature enables to obtain information about use and capabilities of types at runtime?

  • (A) Runtime type ID
  • (B) Reflection
  • (C) Attributes
  • (D) None of the mentioned

A

Admin • 833.24K Points
Coach

Q. Choose the namespace which consists of classes that are part of .NET Reflection API:

  • (A) System.Text
  • (B) System.Name
  • (C) System.Reflection
  • (D) None of the mentioned

A

Admin • 833.24K Points
Coach

Q. What is the output of the following program :

Code:
i = 0
while i < 3:
print i
i += 1
else:
print 0
  • (A) 0 1 2 3 0
  • (B) 0 1 2 0
  • (C) 0 1 2
  • (D) Error

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ