Managing Components and .NET Assemblies

Posted on
Like what you see? Share it.Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone

70-305 – Developing and Implementing Web Applications with Microsoft Visual Basic .NET and Microsoft Visual Studio .NET

 

Objective: Creating and Managing Components and .NET Assemblies
SubObjective: Create and modify a .NET assembly

 

Item Number: 70-305.2.1.4
Single Answer, Multiple Choice

 

You create a user control named AddressInput that contains several other constituent controls.
You need to expose the pNum property of the control so it will be accessible from the Web Form
that uses the control.

 

Which statement should you use to expose the property?

 

 

  1. Public Property pNum As Integer
  2. Public Function pNum As Integer
  3. Private Property pNum As Integer
  4. Protected Property pNum As Integer

 

Answer:
A. Public Property pNum As Integer

 

Tutorial:
You would use the code that declares a public property. By default, constituent controls are declared as private, so they would not be available to the user. To expose the property, you can create a custom public property and associate that property with the property of the constituent control.

 

All of the other options are incorrect. You would need to declare the property as public to expose it to the control’s users.

 

Reference:
1. MSDN Library Visual Studio .NET – Search
– Visual Basic and Visual C# Concepts – Exposing Properties of Constituent Controls

Like what you see? Share it.Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone
cmadmin

ABOUT THE AUTHOR

Posted in Archive|

Comment: