You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xml/System.Reflection/IReflect.xml
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,12 @@
55
55
<formattype="text/markdown"><. <xref:System.Reflection.IReflect> defines a subset of the <xref:System.Type> reflection methods. Implementing this interface enables a type to customize its behavior when the object is being accessed from COM as an `IDispatch` object. The <xref:System.Runtime.InteropServices.CustomMarshalers.ExpandoToDispatchExMarshaler> class can be used to marshal an object that implements <xref:System.Reflection.IReflect> or <xref:System.Runtime.InteropServices.Expando.IExpando> as a COM `IDispatch` object, and vice versa.
58
+
59
+
In .NET 10 and later versions, no COM object casts successfully to this interface. If you need access, it's recommended to project and define a managed definition of `IDispatch` or `IDispatchEx`.
60
+
61
+
In .NET 5 through .NET 9, COM objects that implement `IDispatchEx` can be cast to this interface, but all methods throw `TypeLoadException`.
62
+
63
+
On .NET Framework, the <xref:System.Reflection.IReflect> interface is used to interoperate with the [IDispatch interface](/windows/win32/api/oaidl/nn-oaidl-idispatch). <xref:System.Reflection.IReflect> defines a subset of the <xref:System.Type> reflection methods. Implementing this interface enables a type to customize its behavior when the object is being accessed from COM as an `IDispatch` object. The <xref:System.Runtime.InteropServices.CustomMarshalers.ExpandoToDispatchExMarshaler> class can be used to marshal an object that implements <xref:System.Reflection.IReflect> or <xref:System.Runtime.InteropServices.Expando.IExpando> as a COM `IDispatch` object, and vice versa.
0 commit comments