Επεξεργασία

Κοινή χρήση μέσω


UniqueId.TryGetGuid Method

Definition

Tries to get the value of the UniqueId as a Guid.

Overloads

TryGetGuid(Guid)

Tries to get the value of the UniqueId as a 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

Tries to get the value of the UniqueId as a Guid.

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

guid
Guid

The Guid if successful; otherwise Empty.

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

Tries to get the value of the UniqueId as a Guid and store it in the given byte array at the specified offset.

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

buffer
Byte[]

byte array that will contain the Guid.

offset
Int32

Position in the byte array to start inserting the Guid value.

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.

Applies to