SqlChars Class

Definition

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
Inheritance
SqlChars
Attributes
Implements

Remarks

SqlChars can be obtained for varchar, nvarchar, char, nchar, text, and ntext values, or can be created over an unmanaged buffer.

Constructors

SqlChars()

Initializes a new instance of the SqlChars class.

SqlChars(Char[])

Initializes a new instance of the SqlChars class based on the specified character array.

SqlChars(SqlString)

Initializes a new instance of the SqlChars class based on the specified SqlString value.

Properties

Buffer

Returns a reference to the internal buffer.

IsNull

Gets a Boolean value that indicates whether this SqlChars is null.

Item[Int64]

Gets or sets the SqlChars instance at the specified index.

Length

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

Returns a null instance of this SqlChars.

Storage

Returns information about the storage state of this SqlChars instance.

Value

Returns a managed copy of the value held by this SqlChars.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetXsdType(XmlSchemaSet)

Returns the XML Schema definition language (XSD) of the specified XmlSchemaSet.

MemberwiseClone()

Creates a shallow copy of the current Object.

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

Copies characters from this SqlChars instance to the passed-in buffer and returns the number of copied characters.

SetLength(Int64)

Sets the length of this SqlChars instance.

SetNull()

Sets this SqlChars instance to null.

ToSqlString()

Converts this SqlChars instance to its equivalent SqlString representation.

ToString()

Returns a string that represents the current object.

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

Copies characters from the passed-in buffer to this SqlChars instance.

Operators

Explicit(SqlChars to SqlString)

Converts a SqlChars structure to a SqlString structure.

Explicit(SqlString to SqlChars)

Converts a SqlString structure to a SqlChars structure.

Explicit Interface Implementations

ISerializable.GetObjectData(SerializationInfo, StreamingContext)

Gets serialization information with all the data needed to reinstantiate this SqlChars instance.

IXmlSerializable.GetSchema()

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

IXmlSerializable.ReadXml(XmlReader)

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

IXmlSerializable.WriteXml(XmlWriter)

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Applies to

See also