Mono Class Library: System.Runtime.InteropServices Namespace

System.Runtime.InteropServices.OutAttribute Class

Indicates that a parameter will be marshaled from the callee back to the caller.

See Also: OutAttribute Members

System.Object
     System.Attribute
          System.Runtime.InteropServices.OutAttribute

[System.AttributeUsage(System.AttributeTargets.Parameter, Inherited=false)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class OutAttribute : Attribute

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.

Remarks

Note: The System.Runtime.InteropServices.InAttribute and System.Runtime.InteropServices.OutAttribute are not required. In the absence of explicit settings, the system assumes that all arguments passed by reference are passed in/out and that all non-reference parameters are in. The only exception is the System.Text.StringBuilder class, which is always assumed to be in/out. The System.Runtime.InteropServices.InAttribute and System.Runtime.InteropServices.OutAttribute are particularly useful when applied to formatted types that cannot be block-copied. Since these types require copying during marshaling, you can use System.Runtime.InteropServices.InAttribute and System.Runtime.InteropServices.OutAttribute to eliminate the generation of unnecessary copies.

Compilers are required to not preserve this type in metadata as a custom attribute. Instead, compilers are required to emit it directly in the file format, as described in Partition II of the CLI Specification. Metadata consumers, such as the Reflection API, are required to retrieve this data from the file format and return it as if it were a custom attribute.

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0