VB Middle Class Module Implementation Comparison with C ++ (1)

xiaoxiao2021-03-06  64

VB6.0 is essentially not a pure object-oriented language, but an object-based language. Sentence is an object-oriented simplification, remove some object-oriented language elements for beginners (for example, Inherit, overloaded ...), making the original habit to develop programmers who have been programmed for process language to develop more heart.

But it is because of the use of Basic, it has caused it to ignore its object-based support when developing software with VB6.0. This is very like we used to write a program, once it is changed to C , written procedures Or the function call function, a little-oriented thinking is not, just use some of the keywords of C . In fact, object-oriented methods are abstracts about things, this abstract direct result is to improve the code. Reuse, and simultaneously bring certain stability. It is not possible to object-oriented, not to solve all the problems of the panacea, but under certain conditions, it is indispensable.

Therefore, we use VB to develop software, we must reasonably use object-based ideas. First, the required function is abstracted, and then package it, and finally achieve it by creating objects.

In VB, I sometimes have not created a classmodule, but this doesn't mean that there is no object in your code. In fact, as long as the project exists, then you have Class.

(Fail)

转载请注明原文地址:https://www.9cbs.com/read-114278.html

New Post(0)