System.Runtime.CompilerServices.IsCopyConstructed Class

Indicates that any copying of values of this type must use the copy constructor provided by the type. This class cannot be inherited.

See Also: IsCopyConstructed Members

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public static class IsCopyConstructed

Remarks

Any type modified by the System.Runtime.CompilerServices.IsCopyConstructed class must implement a method named MarshalCopy that calls the native copy constructor.

Any native C++ type that is emitted into metadata with copy constructors needs to have those methods called by the marshaler when copying values across the marshaling boundary. The Microsoft C++ compiler modifies all native C++ types in method parameters and return types that have this modifier to trigger this behavior in the marshaling code.

Compilers emit custom modifiers within metadata to change the way that the just-in-time (JIT) compiler handles values when the default behavior is not appropriate. When the JIT compiler encounters a custom modifier, it handles the value in the way that the modifier specifies. Compilers can apply custom modifiers to methods, parameters, and return values. The JIT compiler must respond to required modifiers but can ignore optional modifiers.

You can emit custom modifiers into metadata using one of the following techniques:

Requirements

Namespace: System.Runtime.CompilerServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0