System.Data.SqlTypes.SqlGuid.ToByteArray C# (CSharp) Method

ToByteArray() public method

public ToByteArray ( ) : byte[]
return byte[]
        public byte[] ToByteArray()
        {
            byte[] ret = new byte[s_sizeOfGuid];
            _value.CopyTo(ret, 0);
            return ret;
        }

Usage Example

        public static SqlBinary op_Explicit(SqlGuid x)
        {
            if (x.IsNull)
            {
                return(SqlBinary.Null);
            }

            return(new SqlBinary(x.ToByteArray()));
        }
All Usage Examples Of System.Data.SqlTypes.SqlGuid::ToByteArray