|
Cet article a fait l'objet d'une traduction automatique. Déplacez votre pointeur sur les phrases de l'article pour voir la version originale de ce texte. Informations supplémentaires.
|
Traduction
Source
|
Espaces de noms dans Visual Basic
Dim LBox As System.Windows.Forms.ListBox
' Define a new object based on your ListBox class. Dim LBC As New ListBox ' Define a new Windows.Forms ListBox control. Dim MyLB As New System.Windows.Forms.ListBox
Dim LBC As New ListBoxProject.Form1.ListBox
Imports LBControl = System.Windows.Forms.ListBox Imports MyListBox = ListBoxProject.Form1.ListBox
Dim LBC As LBControl Dim MyLB As MyListBox
' This namespace contains a class called Class1. Imports MyProj1 ' This namespace also contains a class called Class1. Imports MyProj2
Namespace SpecialSpace Namespace System Class abc Function getValue() As System.Int32 Dim n As System.Int32 Return n End Function End Class End Namespace End Namespace
Namespace SpecialSpace Namespace System Class abc Function getValue() As Global.System.Int32 Dim n As Global.System.Int32 Return n End Function End Class End Namespace End Namespace
Namespace Global.Magnetosphere End Namespace Namespace Global Namespace Magnetosphere End Namespace End Namespace
Module Module1 Sub Main() Dim encoding As New System.Text.TitanEncoding ' If the namespace defined below is System.Text ' instead of Global.System.Text, then this statement ' causes a compile-time error. Dim sb As New System.Text.StringBuilder End Sub End Module Namespace Global.System.Text Class TitanEncoding End Class End Namespace