3.7.2 namespace

Source: Internet
Author: User

Classes and other data types are required when writing. NET applications. To make applications more organized and organized, you need to aggregate them into the namespace, Which is why Microsoft uses the. NET Framework class library. Microsoft.. NET Framework SDK documentation. the. NET Framework class library contains more than 80 namespaces, including frequently used important namespaces, such as System and System. IO, System. drawing, System. data.
If you need to use a namespace frequently in a program, you can import the namespace. In this way, you do not have to write the namespace repeatedly every time you call its members.
Syntax:
Import namespace name
After the preceding syntax is used to import a specified namespace, you can use the simple method.
Imports System
Class Employee
Dim salary As Decimal = 40000
Dim yearlyBonus As Decimal = 4000
Public Sub PrintSalary ()
Reponse. Write (salary)
End Sub
End Class

BibliographyPrevious sectionNext section

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.