Using Attributes to Hide a Method from Intellisense

Provided by Molly Pell, Senior Systems Analyst

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()
{
}


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.


View all FMS products for Microsoft Access All Our Microsoft Access Products

 

 

Free Product Catalog from FMS