NamespaceCollection.AutoImportVBNamespace Egenskap
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Hämtar eller anger ett värde som avgör om Visual Basic namnområdet importeras utan att behöva ange det.
public:
property bool AutoImportVBNamespace { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("autoImportVBNamespace", DefaultValue=true)]
public bool AutoImportVBNamespace { get; set; }
[<System.Configuration.ConfigurationProperty("autoImportVBNamespace", DefaultValue=true)>]
member this.AutoImportVBNamespace : bool with get, set
Public Property AutoImportVBNamespace As Boolean
Egenskapsvärde
true om Visual Basic namnområdet importeras automatiskt, annars false. Standardvärdet är true.
- Attribut
Exempel
Följande kodexempel visar hur du använder egenskapen AutoImportVBNamespace . Det här kodexemplet är en del av ett större exempel för PagesSection klassen.
// Get the AutoImportVBNamespace property.
Console.WriteLine("AutoImportVBNamespace: '{0}'",
pagesSection.Namespaces.AutoImportVBNamespace.ToString());
// Set the AutoImportVBNamespace property.
pagesSection.Namespaces.AutoImportVBNamespace = true;
' Get the AutoImportVBNamespace property.
Console.WriteLine( _
"AutoImportVBNamespace: '{0}'", _
pagesSection.Namespaces.AutoImportVBNamespace)
' Set the AutoImportVBNamespace property.
pagesSection.Namespaces.AutoImportVBNamespace = True
Kommentarer
För ASP.NET sidor som skrivits med Visual Basic importeras namnområdet Microsoft.VisualBasic automatiskt såvida inte egenskapen AutoImportVBNamespace är false.