<Type Name="SafeFileHandle" FullName="Microsoft.Win32.SafeHandles.SafeFileHandle">
  <TypeSignature Language="C#" Value="public sealed class SafeFileHandle : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid" />
  <AssemblyInfo>
    <AssemblyName>mscorlib</AssemblyName>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid</BaseTypeName>
  </Base>
  <Interfaces />
  <Docs>
    <summary>A SafeHandle for file descriptors.</summary>
    <remarks>
      <para>This is a type safe <see cref="T:System.Runtime.InteropServices.SafeHandle" /> that wraps file descriptors. </para>
      <para>
Application developers should use SafeFileHandles instead of <see cref="T:System.IntPtr" /> for storing file handles, as SafeFileHandles will ensure that file descriptors are properly closed (even in the presence of an AppDomain unload) and will prevent problems like handle reuse.
</para>
      <para>
SafeHandles can be used in P/Invoke parameters, P/Invoke return values and structures passed to unmanaged code.
</para>
    </remarks>
    <since>.NET 2.0</since>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public SafeFileHandle (IntPtr preexistingHandle, bool ownsHandle);" />
      <MemberType>Constructor</MemberType>
      <Parameters>
        <Parameter Name="preexistingHandle" Type="System.IntPtr" />
        <Parameter Name="ownsHandle" Type="System.Boolean" />
      </Parameters>
      <Docs>
        <param name="preexistingHandle">The file descriptor to wrap.</param>
        <param name="ownsHandle">Whether the SafeFileHandle owns the handle;  If it does, it will ensure that it gets properly closed on finalization.</param>
        <summary>To be added.</summary>
        <remarks>Use the <paramref name="ownsHandle" /> parameter to control whether the SafeFileHandle will close the descriptor or not.</remarks>
        <since version=".NET 2.0" />
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="ReleaseHandle">
      <MemberSignature Language="C#" Value="protected override bool ReleaseHandle ();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>To be added.</summary>
        <returns>To be added.</returns>
        <remarks>To be added.</remarks>
        <since version=".NET 2.0" />
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
  </Members>
</Type>
