In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the use of VB.NET object members, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to know about it.
Object is the basic unit in object-oriented programming. An object is an element of an application that represents an "instance" of a class. Fields, properties, methods, and events are the building blocks of objects and the members that make up them.
Object
By specifying the name of the object variable and the period (.) And the name of the member to access the VB.NET object member. The following example sets the Text property of the Label object.
WarningLabel.Text = "Data not saved"
Fields and properties
A method is an operation that an object can perform. For example, Add is a method of the ComboBox object that adds a new item to the combo box.
The following example illustrates the Start method of the Timer object.
Dim safetyTimer As New System.Windows.Forms.Timer safetyTimer.Start ()
Note that a method is just a "process" exposed by an object.
Event
When you create an object from a class, you get an instance of that class. Members declared without the Shared (Visual Basic) keyword are "instance members" and they belong strictly to that particular instance. Instance members in one instance are independent of the same VB.NET object members in other instances of the same class. For example, an instance member variable can have different values in different instances.
Members declared with the Shared keyword are "shared members" that belong to the class as a whole and not to any particular instance. A shared member exists only once, no matter how many instances are created for its class, whether or not no instances are created. For example, a shared member variable has only one value, which is available to all code that can access the class.
IntelliSense list of members of the VB.NET object
IntelliSense lists the members of the class when you activate its list members option, for example, when you put a period (.) Access operator key timing as a member. If the period you type follows the name of a variable declared as an instance of the class, IntelliSense lists all instance members without any shared members. If the period you type follows the class name itself, IntelliSense lists only all shared members, not any instance VB.NET object members.
Thank you for reading this article carefully. I hope the article "what is the use of VB.NET object members" shared by the editor will be helpful to everyone? at the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.