Practice Questions

Question 1You need to create several forms capable of accepting and validating addresses, accepting information such as the name, street name, state, country, and ZIP code using TextBox and ComboBox controls. You want to package your input and validation code in a standard component so that you can reuse the control. Which of the following classes should be the base class of your component?
  • A. System.Windows.Forms.Control

  • B. System.Windows.Forms.UserControl

  • C. System.Windows.Forms.Form

  • D. System.ComponentModel.Component

A1: Answer B is correct. The System.Windows.Forms.UserControl class provides the capability to quickly create a reusable component by combining existing Windows controls. Answer A is incorrect because extending ...

Get Developing and Implementing Windows®-Based Applications with Visual C#™ .NET and Visual Studio® .NET Exam Cram™ 2 (Exam 70-316) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.