TypeDescriptor.RemoveAssociation Method (Object, Object)

 

Removes an association between two objects.

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

[PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
public static void RemoveAssociation(
	object primary,
	object secondary
)

Parameters

primary
Type: System.Object

The primary Object.

secondary
Type: System.Object

The secondary Object.

Exception Condition
ArgumentNullException

One or both of the parameters are null.

The RemoveAssociation method removes an association between two objects formed by the CreateAssociation method.

A WeakReference is used to maintain the association between the primary and secondary object; therefore, this method does not influence when either object is finalized or reclaimed by garbage collection.

NamedPermissionSet

for full access to system resources. Demand value: LinkDemand. Associated state:

.NET Framework
Available since 2.0
Return to top
Show: