TryGetGuid Method (Byte[], Int32)
Collapse the table of content
Expand the table of content

UniqueId.TryGetGuid Method (Byte(), Int32)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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

Namespace:  System.Xml
Assembly:  System.Runtime.Serialization (in System.Runtime.Serialization.dll)

'Declaration
Public Function TryGetGuid ( _
	buffer As Byte(), _
	offset As Integer _
) As Boolean

Parameters

buffer
Type: System.Byte ()
byte array that will contain the Guid.
offset
Type: System.Int32
Position in the byte array to start inserting the Guid value.

Return Value

Type: System.Boolean
true if the value stored in this instance of UniqueId is a Guid; otherwise, false.

ExceptionCondition
ArgumentNullException

buffer is Nothing.

ArgumentOutOfRangeException

offset less than zero or greater than the length of the array.

ArgumentException

buffer and offset provide less than 16 valid bytes.

This method is unsafe.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft