/// <summary> /// Convert to a managed byte array. /// </summary> /// <returns>The managed byte array.</returns> public byte[] ToArray() { using (SafeSidBufferHandle handle = ToSafeBuffer()) { return(NtObjectUtils.SafeHandleToArray(handle, handle.Length)); } }