In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the VB.NET method and attribute naming rules, the article is very detailed, has a certain reference value, interested friends must read it!
1. Methods
Whether it is a function or a subroutine, the method must be named after a verb or verb phrase. There is no need to distinguish between functions and subroutines, and there is no need to specify the return type.
Sub Open (ByVal CommandString
As String)
Function SetCopyNumber
(ByVal CopyNumber As Integer)
The parameter needs to specify whether ByVal or ByRef, which makes the side of the program long when written, but it is necessary. If there are no special cases, use ByVal. For the naming method of parameters, refer to the following "naming method of variables". Methods that need to be overloaded, generally do not write Overloads, and write overloaded methods as needed.
2. Attributes
In principle, a field (Field) cannot be exposed, and properties are generally used to access the value of the field. The attribute is named after a concise and clear noun:
Property Concentration As Single Property Customer As CustomerTypes
3. Events
Events are special properties that can only be used in the context of event handling. The principle of naming is generally the verb or the participle of the verb, indicating the time of the event through tenses:
Event Click As ClickEventHandler
Event ColorChanged As
ColorChangedEventHangler
The above is all the content of the article "what are VB.NET methods and attribute naming rules?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.