Get the App
SLTechnology News&Howtos  ›  Development  › 

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

Shulou Source: shulou.com Published: 2022-06-02 08:49:53 09月29日 Update

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!

Tags: Method different event internal power attribute article mind skill programming skill programming content that is independent variable not much that is representative keyword keyword function name Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Docker MySQL OPPO Reno Shulou Information