I said VB. Net (on)

zhaozj2021-02-08  242

I said VB. NET (a) (Author: green apple studio compile March 2001 07 Ri 14:47) .NET concept proposed by Microsoft, is to penetrate all aspects of our lives. It will produce the role, as described in an industry in an industry: "Please forget that you think you know, .NET will change everything!" In this case, whether it is an IT industry, or an enterprise decision maker, quickly understand the meaning and far-reaching impact of this new concept, it is very necessary. Summary VB is constantly developing, it has the previous VB programmer dreams to have performance, imagine that you will use these properties as you want, is it very excited? However, the VB version of the listing sales in the fourth quarter of 2001 may bring some small troubles, because it is necessary to fully master it take a longer learning cycle, including some subtle changes, you may be in use. There is an error when they are. Conditions that need to be prepared: It is recommended to get Visual Basic.Net Beta, which is useful for all VB programmers. The Microsoft .NET platform covers a wide range, and it is difficult to predict its true meaning. We noticed that there are a lot about the incorrect understanding of .NET. So in this article, we will give you a concept of vb.net is something, from the head to the end, what is it, what it can do, how to give full play to its advantages. We must specially look at the change of IDE, object-oriented characteristics, changes in the underlying structure, some "modern" syntax and packaging and distribution. We will discuss what these features can do for you, explain their strengths and deficiencies. Since these changes are so large, and involve party, it is desirable that this article can meet all your requirements is unrealistic. To understand all knowledge, please refer to article and books. Visual Basic.net is completely different from the development tools you know now, and this new version will change your future. How big is it? If you feel that you migrate from VB3 to VB4 is a big change, then VB.NET will make you feel shocked. This upgrade is said to be a new version of VB, it is better to migrate to a new platform, and what you are facing and migrating from DOS to Windows. VB Gets the first new feature that the inheritance capability VB.NET is expected to be inheritance. Inheritance is the most required function for VB developers for a long time. Judging the requirements of the inheritance is just a very interesting thing like a localization compiler earlier, the latter, when Microsoft provides one, you can almost not hear how many words in this area . Visual Basic is now a real object-oriented language. In the past, you can create a pseudo-implemented object inheritance by using VB's interface inheritance, but now you don't have to do this. Visual Basic.net now provides a large number of object-oriented features, including application inheritance, which allows you to export the classes you want to create from other classes. Like other object-oriented languages, you can override the methods and properties of the base class, and you can achieve a polymorphism to create a robust, scalable components.

For example, suppose you inheriting a forklift class from the base class Crane, you can use the default implementation of the LIFT method in the base class below: Public Class forklift inherits Crane Overrides Sub Lift (Byref _ Height As Double) Height = Height 10 End Sub End Class VB.NET not only allows you to override methods or properties; it can also make you overload the method. The overload is the ability to define the same name, but the ability to use different data types or properties. For example, assume that you have a component to sort the arrays of different data types, you don't need three (one of the data types) different names; in fact you can overload a method: Overloads Sub SortArray (byref _ Avaluees () as string) ... overloads sub sortarray (byref _ avalues ​​() AS integer ... Overloads Sub SortArray (byref _ avalues ​​() as object) Another change is: The form is now a class module. This means that the class itself contains all the "fertilizers" code of the form. You might want to know why you have to see the code you have not seen before, but this change also brings powerful new features, including the ability to inherit these forms. Microsoft called this technology as visual inheritance. Assuming your dialog box has a standard format, such as a row button on one side of the form, and there is a logo on the corner, then you can create a form template (class) by visualization, and from this base class Export the required form. Everything is an object code multiplex simplifies the development process, such as implementation and visualization inherits such a function of easier, more powerful code multiplexing. However, the code multiplex is not here. You can inherit the class defined in other VS.NET languages ​​by supporting the Universal Language Runtime - CLR of VB.NET. For example, you or others have created a C # class, and then inherit it from VB. VB.NET's object-oriented ability extends the path of language itself: Everything is an object. This means that more intrinsic features are more inner features than in previous VB versions, you will be rarely forced to use the Windows API. For example, in the previous VB version, you use the LoadPicture method to load the image and use the Line method (or a faster API) line using a form. Now you use the System.drawing object to create and process graphics. You can display a picture on the form: picshowPicture.Image.FromFile (_ "c: /test.bmp") Note VB.NET "Everything is Object" way The statement can be used longer. Consider the following statement, it draws a yellow-green line on a graphics object: Objgraphics.drawline (System.drawing. _ Pens.Chartreuse, 0, 0, 100, 100) These long statements are also beneficial: improved features, Adaptability and ease of use. Once, you have to achieve advanced features, you have to dig in the document, often have to resort to the API. Now, the related functional sets are in line with logically contained in the object. Another advantage of this way of handling is that the class has been organized well. So, browse the object you are interested, find what they do is actually very interesting.

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

New Post(0)