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

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. Which of the following statements are correct about the delegate declaration given below? delegate void del(int i);
1. On declaring the delegate a class called del will get created.
2. The signature of del need not be same as the signature of the method that we intend to call using it.
3.The del class will be derived from the Multicast Delegate class.
4. The method that can be called using del should not be a static method.
5. The del class will contain a one-argument constructor and an lnvoke() method.

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

A

Admin • 833.24K Points
Coach

Q. Suppose a Generic class called SortObjects is to be made capable of sorting objects of any type (Integer, Single, Byte etc.). Which of the following programming constructs should be used to implement the comparison function?

  • (A) Namespace
  • (B) Interface
  • (C) Encapsulation
  • (D) Delegate

A

Admin • 833.24K Points
Coach

Q. What is a delegate?

  • (A) A strongly typed function pointer.
  • (B) A light weight thread or process that can call a single method.
  • (C) A reference to an object in a different process.
  • (D) An inter-process message channel.

A

Admin • 833.24K Points
Coach

Q. Which of the following is included in Visual Studio IDE?

  • (A) Form Designer
  • (B) Code Editor
  • (C) Solution Explorer
  • (D) All of the above

A

Admin • 833.24K Points
Coach

Q. Which of the following is true about dispose() method?

  • (A) This method is protected.
  • (B) Its return type is int.
  • (C) It accepts a float parameter.
  • (D) All of the above.

A

Admin • 833.24K Points
Coach

Q. Button class derives from

  • (A) Checkbox
  • (B) RadioButton
  • (C) ButtonBase
  • (D) None of the above

A

Admin • 833.24K Points
Coach

Q. Which namespace includes most of the Control classes for developing Windows applications?

  • (A) System;
  • (B) System.Windows.Controls
  • (C) System.Windows.Components.Forms
  • (D) System.Windows.Forms

A

Admin • 833.24K Points
Coach

Q. Which of the Control objects is viewed as a container that can hold other objects when you design a Windows application?

  • (A) Control
  • (B) Button
  • (C) Window
  • (D) Form

A

Admin • 833.24K Points
Coach

Q. When an instance method declaration includes the abstract modifier, the method is said to be an ______.

  • (A) Abstract method
  • (B) Instance method
  • (C) Sealed method
  • (D) Expression method

A

Admin • 833.24K Points
Coach

Q. The theory of _____ implies that user can control the access to a class, method, or variable.

  • (A) Data hiding
  • (B) Encapsulation
  • (C) Information Hiding
  • (D) Polymorphism

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