Free Resources from FMS

Additional Resources

 

Thank you! Thank you! I just finished reading this document, which was part of a link in the recent Buzz newsletter. I have printed it for others to read, especially those skeptical on the powers of Access and its capabilities.

Darren D.

 

Free Catalog

 

Using Attributes to Hide a Method from Intellisense

Provided by: Molly Pell, Technical Project Manager

The .NET Framework provides a mechanism for annotating programming elements using Attributes. Attributes allow you to add descriptive annotations to methods, enforce constraints, determine run-time behavior, and more. The .NET Framework includes several useful built-in Attributes, and even allows you to create your own Attributes for further customization.

One interesting example is using an attribute to hide a method from Intellisense, as shown below:

'VB
<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>
Public Sub myHiddenMethod()

End Sub
 

// C#
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public void myHiddenMethod()
{
}

More Information

For more information, see Attributes Overview and EditorBrowsableAttribute Class.

 

Return to the tips page