This documentation is archived and is not being maintained.

SafeFileHandle Members

Represents a wrapper class for a file handle.

The following tables list the members exposed by the SafeFileHandle type.

  Name Description
Public method SafeFileHandle Initializes a new instance of the SafeFileHandle class.

  Name Description
Public property IsClosed  Gets a value indicating whether the handle is closed.(inherited from SafeHandle)
Public property IsInvalid  Gets a value that indicates whether the handle is invalid.(inherited from SafeHandleZeroOrMinusOneIsInvalid)

  Name Description
Public method Close  Marks the handle for releasing and freeing resources. (inherited from SafeHandle)
Public method DangerousAddRef  Manually increments the reference counter on SafeHandle instances. (inherited from SafeHandle)
Public method DangerousGetHandle  Returns the value of the handle field. (inherited from SafeHandle)
Public method DangerousRelease  Manually decrements the reference counter on a SafeHandle instance. (inherited from SafeHandle)
Public method Dispose  Releases all resources used by the SafeHandle class. (inherited from SafeHandle)
Public method Equals  Overloaded. Determines whether two Object instances are equal. (inherited from Object)
Public method GetHashCode  Serves as a hash function for a particular type. (inherited from Object)
Public method GetType  Gets the Type of the current instance. (inherited from Object)
Public method Static ReferenceEquals  Determines whether the specified Object instances are the same instance. (inherited from Object)
Public method SetHandleAsInvalid  Marks a handle as no longer used. (inherited from SafeHandle)
Public method ToString  Returns a String that represents the current Object. (inherited from Object)