本文整理汇总了C#中System.Data.SqlTypes.SqlGuid.ToByteArray方法的典型用法代码示例。如果您正苦于以下问题:C# SqlGuid.ToByteArray方法的具体用法?C# SqlGuid.ToByteArray怎么用?C# SqlGuid.ToByteArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Data.SqlTypes.SqlGuid
的用法示例。
在下文中一共展示了SqlGuid.ToByteArray方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToByteArray
/// <summary>
/// Converts the value of the specified SqlGuid to its equivalent byte array representation.
/// </summary>
/// <param name="value">An SqlGuid.</param>
/// <returns>The equivalent byte array representation.</returns>
public static Byte[] ToByteArray(SqlGuid value) { return value.IsNull ? null : value.ToByteArray(); }
示例2: ToSqlBytes
/// <summary>
/// Converts the value of the specified SqlGuid to its equivalent SqlBytes representation.
/// </summary>
/// <param name="value">An SqlGuid.</param>
/// <returns>The equivalent SqlBytes.</returns>
public static SqlBytes ToSqlBytes(SqlGuid value) { return value.IsNull ? SqlBytes.Null : new SqlBytes(value.ToByteArray()); }
示例3: ToByteArray
/// <summary>Converts the value from <c>SqlGuid</c> to an equivalent <c>Byte[]</c> value.</summary>
public static Byte[] ToByteArray(SqlGuid p) { return p.IsNull ? (Byte[])null : p.ToByteArray(); }
示例4: ToSqlBytes
/// <summary>Converts the value from <c>SqlGuid</c> to an equivalent <c>SqlBytes</c> value.</summary>
public static SqlBytes ToSqlBytes(SqlGuid p) { return p.IsNull ? SqlBytes.Null : new SqlBytes(p.ToByteArray()); }
示例5: ToLinqBinary
/// <summary>Converts the value from <c>SqlGuid</c> to an equivalent <c>Byte[]</c> value.</summary>
public static Binary ToLinqBinary(SqlGuid p) { return p.IsNull? null: new Binary(p.ToByteArray()); }
示例6: op_Explicit
public static SqlBinary op_Explicit(SqlGuid x)
{
if(x.IsNull)
{
return SqlBinary.Null;
}
return new SqlBinary(x.ToByteArray());
}