FileStream.SafeFileHandle Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a SafeFileHandle object that represents the operating system file handle for the file that the current FileStream object encapsulates.
public:
virtual property Microsoft::Win32::SafeHandles::SafeFileHandle ^ SafeFileHandle { Microsoft::Win32::SafeHandles::SafeFileHandle ^ get(); };
public virtual Microsoft.Win32.SafeHandles.SafeFileHandle SafeFileHandle { get; }
public virtual Microsoft.Win32.SafeHandles.SafeFileHandle SafeFileHandle { [System.Security.SecurityCritical] get; }
member this.SafeFileHandle : Microsoft.Win32.SafeHandles.SafeFileHandle
[<get: System.Security.SecurityCritical>]
member this.SafeFileHandle : Microsoft.Win32.SafeHandles.SafeFileHandle
Public Overridable ReadOnly Property SafeFileHandle As SafeFileHandle
Property Value
An object that represents the operating system file handle for the file that the current FileStream object encapsulates.
- Attributes
Remarks
The SafeFileHandle property automatically flushes the stream and sets the current stream position to 0. This allows the file to be moved or the stream position to be reset by another stream using the SafeFileHandle returned by this property.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om