forked from dotnet/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHideModuleNameAttribute.xml
59 lines (50 loc) · 2.95 KB
/
HideModuleNameAttribute.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<Type Name="HideModuleNameAttribute" FullName="Microsoft.VisualBasic.HideModuleNameAttribute">
<TypeSignature Language="C#" Value="public sealed class HideModuleNameAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed HideModuleNameAttribute extends System.Attribute" />
<TypeSignature Language="DocId" Value="T:Microsoft.VisualBasic.HideModuleNameAttribute" />
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>The <see langword="HideModuleNameAttribute" /> attribute, when applied to a module, allows the module members to be accessed using only the qualification needed for the module.</summary>
<remarks>
<format type="text/markdown"><] Integrated Development Environment (IDE) for [!INCLUDE[vbprvb](~/includes/vbprvb-md.md)], the module does not show in the statement completion list. Instead, IntelliSense shows the module members.
Even when the module name is hidden, the module members are still accessible through the module.
If a member name conflicts with another identifier or with a member of another module with the `HideModuleNameAttribute` attribute, then the member does not show in IntelliSense at the level of the module.
## Examples
This example shows how to use the `HideModuleNameAttribute` attribute to add a Database object to `My`, which can be accessed through `My.Database`.
[!code-vb[VbCnAttributes#26](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/VbCnAttributes/VB/Class2.vb#26)]
The `Namespace` statement must appear outside of any classes or modules.
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public HideModuleNameAttribute ();" />
<MemberSignature Language="ILAsm" Value=".method public specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.VisualBasic.HideModuleNameAttribute.#ctor" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:Microsoft.VisualBasic.HideModuleNameAttribute" /> attribute.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>