﻿<?xml version="1.0" encoding="utf-8"?><Type Name="OutAttribute" FullName="System.Runtime.InteropServices.OutAttribute" FullNameSP="System_Runtime_InteropServices_OutAttribute" Maintainer="ecma"><TypeSignature Language="ILASM" Value=".class public sealed OutAttribute extends System.Attribute" /><TypeSignature Language="C#" Value="public sealed class OutAttribute : Attribute" /><TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit OutAttribute extends System.Attribute" /><MemberOfLibrary>RuntimeInfrastructure</MemberOfLibrary><AssemblyInfo><AssemblyName>mscorlib</AssemblyName><AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement><Base><BaseTypeName>System.Attribute</BaseTypeName></Base><Interfaces /><Attributes><Attribute><AttributeName>System.AttributeUsage(System.AttributeTargets.Parameter, Inherited=false)</AttributeName></Attribute><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName></Attribute></Attributes><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>You can apply this attribute to parameters.</para><para>The <see cref="T:System.Runtime.InteropServices.OutAttribute" /> is optional. The attribute is supported for COM interop and platform invoke only. In the absence of explicit settings, the interop marshaler assumes rules based on the parameter type, whether the parameter is passed by reference or by value, and whether the type is blittable or non-blittable. For example, the <see cref="T:System.Text.StringBuilder" /> class is always assumed to be In/Out and an array of strings passed by value is assumed to be In.</para><para>Out-only behavior is never a default marshaling behavior for parameters. You can apply the <see cref="T:System.Runtime.InteropServices.OutAttribute" /> to value and reference types passed by reference to change In/Out behavior to Out-only behavior, which is equivalent to using the out keyword in C#. For example, arrays passed by value, marshaled as In-only parameters by default, can be changed to Out-only. However, the behavior does not always provide expected semantics when the types include all-blittable elements or fields because the interop marshaler uses pinning. If you do not care about passing data into the callee, Out-only marshaling can provide better performance for non-blittable types.</para><para>Combining the <see cref="T:System.Runtime.InteropServices.InAttribute" /> and <see cref="T:System.Runtime.InteropServices.OutAttribute" /> is particularly useful when applied to arrays and formatted, non-blittable types. Callers see the changes a callee makes to these types only when you apply both attributes. Since these types require copying during marshaling, you can use <see cref="T:System.Runtime.InteropServices.InAttribute" /> and <see cref="T:System.Runtime.InteropServices.OutAttribute" /> to reduce unnecessary copies.</para><para>For more information on the effect of <see cref="T:System.Runtime.InteropServices.OutAttribute" /> on marshaling behavior, see <format type="text/html"><a href="241AC5B5-928E-4969-8F58-1DBC048F9EA2">[&lt;topic://cpcondirectionalattributes&gt;]</a></format>.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Indicates that data should be marshaled from callee back to caller.</para></summary></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor()" /><MemberSignature Language="C#" Value="public OutAttribute ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters /><Docs><remarks>To be added.</remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Runtime.InteropServices.OutAttribute" /> class.</para></summary></Docs><Excluded>0</Excluded></Member></Members><TypeExcluded>0</TypeExcluded></Type>