SqlBytes SqlBytes SqlBytes SqlBytes Class

定义

表示包装 BufferStream 的可变引用类型。Represents a mutable reference type that wraps either a Buffer or a Stream.

public ref class SqlBytes sealed : System::Data::SqlTypes::INullable, System::Runtime::Serialization::ISerializable, System::Xml::Serialization::IXmlSerializable
[System.Serializable]
public sealed class SqlBytes : System.Data.SqlTypes.INullable, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable
type SqlBytes = class
    interface INullable
    interface IXmlSerializable
    interface ISerializable
Public NotInheritable Class SqlBytes
Implements INullable, ISerializable, IXmlSerializable
继承
SqlBytesSqlBytesSqlBytesSqlBytes
属性
实现

构造函数

SqlBytes() SqlBytes() SqlBytes() SqlBytes()

初始化 SqlBytes 类的新实例。Initializes a new instance of the SqlBytes class.

SqlBytes(Byte[]) SqlBytes(Byte[]) SqlBytes(Byte[]) SqlBytes(Byte[])

根据指定的字节数组初始化 SqlBytes 类的新实例。Initializes a new instance of the SqlBytes class based on the specified byte array.

SqlBytes(SqlBinary) SqlBytes(SqlBinary) SqlBytes(SqlBinary) SqlBytes(SqlBinary)

根据指定的 SqlBytes 值初始化 SqlBinary 类的新实例。Initializes a new instance of the SqlBytes class based on the specified SqlBinary value.

SqlBytes(Stream) SqlBytes(Stream) SqlBytes(Stream) SqlBytes(Stream)

根据指定的 SqlBytes 值初始化 Stream 类的新实例。Initializes a new instance of the SqlBytes class based on the specified Stream value.

属性

Buffer Buffer Buffer Buffer

返回一个对内部缓冲区的引用。Returns a reference to the internal buffer.

IsNull IsNull IsNull IsNull

获取一个布尔值,该值指示此 SqlBytes 是否为 null。Gets a Boolean value that indicates whether this SqlBytes is null.

Item[Int64] Item[Int64] Item[Int64] Item[Int64]

获取或设置指定索引处的 SqlBytes 实例。Gets or sets the SqlBytes instance at the specified index.

Length Length Length Length

获取 SqlBytes 实例中包含的值的长度。Gets the length of the value that is contained in the SqlBytes instance.

MaxLength MaxLength MaxLength MaxLength

获取此 SqlBytes 的内部缓冲区的值的最大长度。Gets the maximum length of the value of the internal buffer of this SqlBytes.

Null Null Null Null

获取此 SqlBytes 的 null 实例。Gets a null instance of this SqlBytes.

Storage Storage Storage Storage

返回有关此 SqlBytes 实例的存储状态的信息。Returns information about the storage state of this SqlBytes instance.

Stream Stream Stream Stream

将此 SqlBytes 的数据作为流进行获取或设置。Gets or sets the data of this SqlBytes as a stream.

Value Value Value Value

返回此 SqlBytes 保存的值的托管副本。Returns a managed copy of the value held by this SqlBytes.

方法

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
GetXsdType(XmlSchemaSet) GetXsdType(XmlSchemaSet) GetXsdType(XmlSchemaSet) GetXsdType(XmlSchemaSet)

返回指定的 XmlSchemaSet 的 XML 架构定义语言 (XSD)。Returns the XML Schema definition language (XSD) of the specified XmlSchemaSet.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
Read(Int64, Byte[], Int32, Int32) Read(Int64, Byte[], Int32, Int32) Read(Int64, Byte[], Int32, Int32) Read(Int64, Byte[], Int32, Int32)

将此 SqlBytes 实例中的字节复制到传入缓冲区中并返回复制的字节数。Copies bytes from this SqlBytes instance to the passed-in buffer and returns the number of copied bytes.

SetLength(Int64) SetLength(Int64) SetLength(Int64) SetLength(Int64)

设置此 SqlBytes 实例的长度。Sets the length of this SqlBytes instance.

SetNull() SetNull() SetNull() SetNull()

将此 SqlBytes 实例设置为 null。Sets this SqlBytes instance to null.

ToSqlBinary() ToSqlBinary() ToSqlBinary() ToSqlBinary()

从此 SqlBinary 实例构造和返回一个 SqlBytesConstructs and returns a SqlBinary from this SqlBytes instance.

ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)
Write(Int64, Byte[], Int32, Int32) Write(Int64, Byte[], Int32, Int32) Write(Int64, Byte[], Int32, Int32) Write(Int64, Byte[], Int32, Int32)

将传入缓冲区中的字节复制到此 SqlBytes 实例中。Copies bytes from the passed-in buffer to this SqlBytes instance.

操作员

Explicit(SqlBinary to SqlBytes) Explicit(SqlBinary to SqlBytes) Explicit(SqlBinary to SqlBytes) Explicit(SqlBinary to SqlBytes)

SqlBinary 结构转换为 SqlBytes 结构。Converts a SqlBinary structure to a SqlBytes structure.

Explicit(SqlBytes to SqlBinary) Explicit(SqlBytes to SqlBinary) Explicit(SqlBytes to SqlBinary) Explicit(SqlBytes to SqlBinary)

SqlBytes 结构转换为 SqlBinary 结构。Converts a SqlBytes structure to a SqlBinary structure.

显式界面实现

ISerializable.GetObjectData(SerializationInfo, StreamingContext) ISerializable.GetObjectData(SerializationInfo, StreamingContext) ISerializable.GetObjectData(SerializationInfo, StreamingContext) ISerializable.GetObjectData(SerializationInfo, StreamingContext)

获取序列化信息以及包含重新实例化此 SqlBytes 实例所需的所有数据。Gets serialization information with all the data needed to reinstantiate this SqlBytes instance.

IXmlSerializable.GetSchema() IXmlSerializable.GetSchema() IXmlSerializable.GetSchema() IXmlSerializable.GetSchema()

此成员支持 .NET Framework 结构,不能在代码中直接使用。This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

IXmlSerializable.ReadXml(XmlReader) IXmlSerializable.ReadXml(XmlReader) IXmlSerializable.ReadXml(XmlReader) IXmlSerializable.ReadXml(XmlReader)

此成员支持 .NET Framework 结构,不能在代码中直接使用。This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

IXmlSerializable.WriteXml(XmlWriter) IXmlSerializable.WriteXml(XmlWriter) IXmlSerializable.WriteXml(XmlWriter) IXmlSerializable.WriteXml(XmlWriter)

此成员支持 .NET Framework 结构,不能在代码中直接使用。This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

适用于

另请参阅