SqlChars 類別

定義

SqlChars 是一種可變動的參考型別 (Reference Type),它會包裝 Char 陣列或 SqlString 執行個體。SqlChars is a mutable reference type that wraps a Char array or a SqlString instance.

public ref class SqlChars sealed : System::Data::SqlTypes::INullable, System::Runtime::Serialization::ISerializable, System::Xml::Serialization::IXmlSerializable
[System.Serializable]
public sealed class SqlChars : System.Data.SqlTypes.INullable, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable
type SqlChars = class
    interface INullable
    interface IXmlSerializable
    interface ISerializable
Public NotInheritable Class SqlChars
Implements INullable, ISerializable, IXmlSerializable
繼承
SqlChars
屬性
實作

備註

SqlChars可以varchar針對、 nvarcharchar 、、ntext和值取得, 也可以透過非受控緩衝區來建立。 nchar textSqlChars can be obtained for varchar, nvarchar, char, nchar, text, and ntext values, or can be created over an unmanaged buffer.

建構函式

SqlChars()

初始化 SqlChars 類別的新執行個體。Initializes a new instance of the SqlChars class.

SqlChars(Char[])

根據指定的字元陣列,初始化 SqlChars 類別的新執行個體。Initializes a new instance of the SqlChars class based on the specified character array.

SqlChars(SqlString)

根據指定的 SqlChars 值來初始化 SqlString 類別的新執行個體。Initializes a new instance of the SqlChars class based on the specified SqlString value.

屬性

Buffer

傳回內部緩衝區的參考。Returns a reference to the internal buffer.

IsNull

取得布林值,這個值表示這個 SqlChars 是否為 null。Gets a Boolean value that indicates whether this SqlChars is null.

Item[Int64]

取得或設定位於指定索引處的 SqlChars 執行個體。Gets or sets the SqlChars instance at the specified index.

Length

取得 SqlChars 執行個體內含值的長度。Gets the length of the value that is contained in the SqlChars instance.

MaxLength

取得內部緩衝區可以保留的值的最大長度 (以雙位元組字元為單位)。Gets the maximum length in two-byte characters of the value the internal buffer can hold.

Null

傳回這個 SqlChars 的 null 執行個體。Returns a null instance of this SqlChars.

Storage

傳回關於這個 SqlChars 執行個體儲存狀態的資訊。Returns information about the storage state of this SqlChars instance.

Value

傳回這個 SqlChars 所保留值的 Managed 複本。Returns a managed copy of the value held by this SqlChars.

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

作為預設雜湊函數。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
GetXsdType(XmlSchemaSet)

傳回指定之 XmlSchemaSet 的 XML 結構描述定義語言 (XSD)。Returns the XML Schema definition language (XSD) of the specified XmlSchemaSet.

MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
Read(Int64, Char[], Int32, Int32)

將字元從這個 SqlChars 執行個體複製到傳入緩衝區,並傳回複製字元的數目。Copies characters from this SqlChars instance to the passed-in buffer and returns the number of copied characters.

SetLength(Int64)

設定這個 SqlChars 執行個體的長度。Sets the length of this SqlChars instance.

SetNull()

將這個 SqlChars 執行個體設定為 null。Sets this SqlChars instance to null.

ToSqlString()

將這個 SqlChars 執行個體轉換成其對等的 SqlString 表示。Converts this SqlChars instance to its equivalent SqlString representation.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)
Write(Int64, Char[], Int32, Int32)

將字元從傳入緩衝區複製到這個 SqlChars 執行個體。Copies characters from the passed-in buffer to this SqlChars instance.

運算子

Explicit(SqlChars to SqlString)

SqlChars 結構轉換成 SqlString 結構。Converts a SqlChars structure to a SqlString structure.

Explicit(SqlString to SqlChars)

SqlString 結構轉換成 SqlChars 結構。Converts a SqlString structure to a SqlChars structure.

明確介面實作

ISerializable.GetObjectData(SerializationInfo, StreamingContext)

取得序列化資訊,以及重新執行個體化這個 SqlChars 執行個體所需的所有資料。Gets serialization information with all the data needed to reinstantiate this SqlChars instance.

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)

此成員支援 .NET Framework 基礎結構,並不能直接使用於您的程式碼中。This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

IXmlSerializable.WriteXml(XmlWriter)

此成員支援 .NET Framework 基礎結構,並不能直接使用於您的程式碼中。This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

適用於

另請參閱