Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion xml/System.Reflection/IReflect.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@
<format type="text/markdown"><![CDATA[
## Remarks
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.
Since .NET 10, no COM object casts successfully to this interface. It is recommended to project and define a managed definition of `IDispatch` or `IDispatchEx` if access is needed.
From .NET 5 until .NET 9, COM objects that implement `IDispatchEx` can be cast to this interface, but all methods throw `TypeLoadException`.
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.
]]></format>
</remarks>
Expand Down