This is used to retrieve the corresponding managed components by passing in the native object.

Namespace:  ESRI.ArcGIS.Desktop.AddIns

Assembly:  ESRI.ArcGIS.Desktop.Addins (in ESRI.ArcGIS.Desktop.Addins.dll) Version: 10.0.0.0 (10.0.0.0)

Syntax

C#
public static T FromNative<T>(
	Object comObject
)
Visual Basic (Declaration)
Public Shared Function FromNative(Of T) ( _
	comObject As Object _
) As T
Visual C++
public:
generic<typename T>
static T FromNative(
	Object^ comObject
)

Parameters

comObject
Type: System..::.Object

The native COM object.

Type Parameters

T

Return Value

The managed component.

Examples

The example code below shows how to get the managed extension by passing in the native extension.
CopyC#
private void GetManagedFromNative()
{
  // Extension1 is a managed add-in extension class.
  Extension1 ext = AddIn.FromNative<Extension1>(ArcMap.Application.FindExtensionByCLSID(uid));
}
CopyVB.NET
Private Sub GetManagedFromNative()
  ' Extension1 is a managed add-in extension class. 
  Dim ext As Extension1 = AddIn.FromNative(Of Extension1)(ArcMap.Application.FindExtensionByCLSID(uid))
End Sub

See Also