UniqueId.TryGetGuid Method
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.
Overloads
TryGetGuid(Guid) | |
TryGetGuid(Byte[], Int32) |
Tries to get the value of the UniqueId as a Guid and store it in the given byte array at the specified offset. |
TryGetGuid(Guid)
- Source:
- UniqueId.cs
- Source:
- UniqueId.cs
- Source:
- UniqueId.cs
public:
bool TryGetGuid([Runtime::InteropServices::Out] Guid % guid);
public bool TryGetGuid (out Guid guid);
member this.TryGetGuid : Guid -> bool
Public Function TryGetGuid (ByRef guid As Guid) As Boolean
Parameters
Returns
true
if the UniqueId represents a Guid; otherwise false
.
Exceptions
buffer
is null
.
buffer
and offset
provide less than 16 valid bytes.
Applies to
TryGetGuid(Byte[], Int32)
- Source:
- UniqueId.cs
- Source:
- UniqueId.cs
- Source:
- UniqueId.cs
public:
bool TryGetGuid(cli::array <System::Byte> ^ buffer, int offset);
public bool TryGetGuid (byte[] buffer, int offset);
[System.Security.SecurityCritical]
[System.Security.SecurityTreatAsSafe]
public bool TryGetGuid (byte[] buffer, int offset);
member this.TryGetGuid : byte[] * int -> bool
[<System.Security.SecurityCritical>]
[<System.Security.SecurityTreatAsSafe>]
member this.TryGetGuid : byte[] * int -> bool
Public Function TryGetGuid (buffer As Byte(), offset As Integer) As Boolean
Parameters
Returns
true
if the value stored in this instance of UniqueId is a Guid; otherwise false
.
- Attributes
Exceptions
buffer
is null
.
offset
less than zero or greater than the length of the array.
buffer
and offset
provide less than 16 valid bytes.
Remarks
This method is unsafe
.