In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces what the VB.NET namespace is, the article is very detailed, has a certain reference value, interested friends must read it!
When writing .NET applications, you need to write classes and other data types. To make applications more organized and organized, you need to aggregate them into namespaces, which is why Microsoft uses the .NET Framework class library.
The NET Framework class library in Microsoft. NET Framework sdk documentation contains more than 80 namespaces, including common and important namespaces, such as System,System.IO,System.Drawing,System.Windows.Forms, and so on For example, in the PrintSalary method in the Employee class, we use the console class in the system namespace.
If you want to use a VB.NET namespace frequently in your program, you can use the method of referencing that namespace so that you don't have to repeat the VB.NET namespace every time its members are called. For example, you can rewrite list4 and list5 as follows.
Imports System Class Employee Dim salary As Decimal = 40000 Dim yearlyBonus As Decimal = 4000 Public Sub PrintSalary () 'print the salary to the Console Console.Write (salary) End Sub Public Shared Sub Main () Dim employee As Employee employee = New Employee () employee.PrintSalary () End Sub End Class
Now you can use namespaces in the PrintSalary method without mentioning namespaces, because namespaces are already referenced.
Classes with the same name are allowed in different VB.NET namespaces, and the most common practice of correctly referencing a class is to mention the namespace before the class name. For example, the reference method of Console in the system namespace is: System.Console.
The above is all the content of the article "what is the VB.NET Namespace?" Thank you for reading! Hope to share the content to help you, more related 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.