Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Switch::GetSupportedAttributes Method

Gets the custom attributes supported by the switch.

Namespace:  System.Diagnostics
Assembly:  System (in System.dll)

protected public:
virtual array<String^>^ GetSupportedAttributes()

Return Value

Type: array<System::String>
A string array that contains the names of the custom attributes supported by the switch, or nullptr if there no custom attributes are supported.

The default implementation for the GetSupportedAttributes method returns nullptr. If a switch is added in a configuration file and custom attributes are specified that are not included in the string array returned by GetSupportedAttributes, a ConfigurationException is thrown when the switch is loaded.

Notes to Inheritors

When inheriting from the Switch class or a derived class, you can override the GetSupportedAttributes method to provide custom attributes for your class.

The following code sample shows an override of the GetSupportedAttributes method for a custom switch.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft