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
) |
Type Parameters
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 ext = AddIn.FromNative<Extension1>(ArcMap.Application.FindExtensionByCLSID(uid));
}
CopyVB.NET
Private Sub GetManagedFromNative()
Dim ext As Extension1 = AddIn.FromNative(Of Extension1)(ArcMap.Application.FindExtensionByCLSID(uid))
End Sub
See Also