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 |