CodeDomEventBindingService::FreeMethod Method (IComponent^, EventDescriptor^, String^)
Visual Studio 2015
Removes the specified method from the code if no event handlers are using it and it is empty.
Assembly: Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
protected: virtual void FreeMethod( IComponent^ component, EventDescriptor^ e, String^ methodName ) override
Parameters
- component
- Type: System.ComponentModel::IComponent^
- methodName
-
Type:
System::String^
The name of the method to remove.
This method removes the method from the code if the number of event handlers using the method is zero and the number of statements inside the method is zero also. If the handler count and the statement count are both non-zero, or if there was an exception when parsing the method statements (indicating that there was non-CLS-compliant code), the method is not removed.
Show: