Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the programming skills of Object Oriented in VB.NET

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you what Object Oriented programming skills in VB.NET, I believe most people do not know much, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Internal work and heart method 1:

The first thing is to write a basic Class space; just keep in mind the following syntax, and you can take steps. It's off to a good start.

Public Class ClassName'/ /... End Class

The second method of internal work and heart

How to declare Data Member; in Class, but often each Data Member has a different scope of use. That is, Public,Private or Protected have different meanings. For example:

Public stands for properties, where methods and events can be used, including the internal and external services of this Class.

Private properties, methods, and events can only be used within this Class.

The Protected property, methods, and events can only be used on the Derived Class of Inherit.

Public Class ClassName [Public | Private | Protected] Variable As DataType'/ /. End Class

Internal work and heart method 3:

Add methods to Class. The method (Method) can be Sub (the number of non-recursive values) or Function (the number of recursive values); some may even have Arguement, and how many Arguement (serial arguments) depend on the function of this method. So the Prototype of the general method can be as follows:

Public Class ClassName [Public | Private | Protected] [Overloads] [Sub] MethodName (Byval Arguement As DataType,...)'/ /. End Sub End Class Public Class ClassName [Public | Private | Protected] [Overloads] [Function] MethodName (Byval Arguement As DataType,...) As DataType'/ /... Return Value End Function End Class

The Overloads keyword is used to create multiple functions with the same name but different arguments, generally used to reduce the trouble of function naming!

These are all the contents of the article "what are the Object Oriented programming skills in VB.NET?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more 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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report