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

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. Constructors are used to

  • (A) initialize the objects
  • (B) construct the data members
  • (C) both a & b
  • (D) None of the mentioned

A

Admin • 833.24K Points
Coach

Q. To overload a method which of the following statement is false?

  • (A) If the return type is different methods are overloaded
  • (B) Name of the overloaded method should be same
  • (C) Type of the parameter should be different
  • (D) Order of the parameter should be different if types are same

A

Admin • 833.24K Points
Coach

Q. Which of the following statements is correct about constructors in C#.NET?

  • (A) A constructor cannot be declared as private
  • (B) A constructor cannot be overloaded
  • (C) A constructor can be a static constructor
  • (D) None of the mentioned

A

Admin • 833.24K Points
Coach

Q. What is return type of constructors?

  • (A) int
  • (B) float
  • (C) void
  • (D) None of the mentioned

A

Admin • 833.24K Points
Coach

Q. Which method have same name as that of its class?

  • (A) delete
  • (B) class
  • (C) constructor
  • (D) None of mentioned

A

Admin • 833.24K Points
Coach

Q. Which of following statement are correct about functions?

  • (A) C# allows a function to have arguments with default values
  • (B) Redefining a method parameter in the method’s body causes an exception
  • (C) C# allows function to have arguments of private type
  • (D) Omitting the return type in method definition results into exception

A

Admin • 833.24K Points
Coach

Q. How many enumerators will exist if four threads are simultaneously working on an ArrayList object?

  • (A) 1
  • (B) 3
  • (C) 2
  • (D) 4

A

Admin • 833.24K Points
Coach

Q. In which of the following collections is the Input/Output index-based?
1. Stack
2. Queue
3. BitArray
4. ArrayList
5. HashTable

  • (A) 1 and 2 only
  • (B) 3 and 4 only
  • (C) 5 only
  • (D) 1, 2 and 5 only

A

Admin • 833.24K Points
Coach

Q. Which of the following statements are correct about the Stack collection?
1. It can be used for evaluation of expressions.
2. All elements in the Stack collection can be accessed using an enumerator. 3. It is used to maintain a FIFO list.
4. All elements stored in a Stack collection must be of similar type.
5. Top-most element of the Stack collection can be accessed using the Peek() method.

  • (A) 1 and 2 only
  • (B) 3 and 4 only
  • (C) 1, 2 and 5 only
  • (D) All of the above

A

Admin • 833.24K Points
Coach

Q. Which of the following statements is incorrect about delegate?

  • (A) Delegates are reference types.
  • (B) Delegates are object oriented.
  • (C) Delegates are type-safe.
  • (D) Only one method can be called using a delegate.

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