SoFunction
Updated on 2025-04-10

Learn object-oriented terms

kind The class is used as a design blueprint to create the code segment of an object, which describes the characteristics of the object; what properties does the object have, how to use the object to complete some tasks, how it responds to events, etc.!
Object An object is an instance of a class, and it is usually created by calling a constructor of the class!
method A method is a function defined in a class. Generally speaking, a method describes an operation that an object can perform!
property Attributes are variables defined in a class, and attributes of a class highlight the properties or state of an object. In some cases, the object's consumer may not allow some properties of the object to be changed because the class creator has specified that those properties cannot be changed by the user. For example, you can only know that I am a boy, but you can’t change it!
event An event is an object method triggered by an external behavior. It can be associated with user behavior (such as clicking on a Button) or system behavior.
Constructor The constructor is a special method called to create an object. In VB, the creation of an object is achieved by creating a process named new in the given class!
Destructor A destructor is a special method called when releasing an object. In VB, in order to write a destructor, we must override the Dispose method of the base class. However, since CLR automatically performs garbage collection, it is rare to explicitly call destructors in managed code. Then, when running resources outside the CLR (such as devices, file handles, network connections, etc.), the Dispose method should be called to ensure the performance of the computer!
Rewrite Rewriting is an object-oriented concept that specifies that a derived class can create different implementation codes for a method of its base class. In fact, it completely rewrites what the method in the base class does!
interface An interface is a convention that defines the structure of methods, properties, times, and indexers. We cannot create objects directly from an interface, but must first implement the characteristics defined by the interface by creating a class!
Package Packaging is a concept, which means to concentrate methods, attributes, and events into a unified class and block the user the details. An example of a package is a car - we operate the car by operating the steering wheel, brakes and acceleration. A good package does not require us to consider fuel injection, flow, etc.
Reload He stipulates that a method can have many different interfaces, but the name of the method is the same.
inherit Inherited classes are extensions to inherited classes.
Inheritance is a mechanism in which subclasses automatically share the parent class data structure and methods. This is a relationship between classes. When defining and implementing a class, it can be carried out on the basis of an existing class, and the content defined by the existing class is taken as its own content, and several new contents are added.
Polymorphic It stipulates that a same function can have different implementations for different objects. For example, an Add method can perform both addition and sum of integers and string concatenation operations!