SqlString 成员

表示要存储到数据库中或要从数据库中检索的字符的可变长度流。SqlString 具有与其相应的 .NET Framework String 数据类型不同的基础数据结构。String 通常使用当前线程的默认 CultureInfo,但是 SqlString 包含其自己的区域设置 Id 和比较标志。两个 SqlString 结构的比较结果不依赖于操作系统和当前线程区域设置。

下表列出了由 SqlString 类型公开的成员。

公共构造函数

  名称 说明
Public method Supported by the .NET Compact Framework SqlString 已重载。初始化 SqlString 类的新实例。

页首

公共字段

  名称 说明
Public field Static Supported by the .NET Compact Framework BinarySort 指定排序应基于字符数值(而非其字母值)。
Public field Static Supported by the .NET Compact Framework BinarySort2 指定排序应基于字符数值(而非其字母值)。
Public field Static Supported by the .NET Compact Framework IgnoreCase 指定 SqlString 比较应忽略大小写。
Public field Static Supported by the .NET Compact Framework IgnoreKanaType 指定字符串比较必须忽略假名类型。假名类型是指日语平假名和片假名字符,它们表示日语中的语音。平假名用于表示日语自有的短语和字词,而片假名用于表示从其他语言借用的字词,如“computer”或“Internet”。语音既可以用平假名也可以用片假名表示。如果选择该值,则认为一个语音的平假名字符等于同一语音的片假名字符。
Public field Static Supported by the .NET Compact Framework IgnoreNonSpace 指定字符串比较必须忽略非空格组合字符,比如音调符号。Unicode 标准将组合字符定义为与基字符组合起来产生新字符的字符。非空格组合字符在呈现时本身不占用字符空间。有关非空格组合字符的更多信息,请参见位于 http://www.unicode.org 上的“Unicode Standard”(Unicode 标准)。
Public field Static Supported by the .NET Compact Framework IgnoreWidth 指定字符串比较必须忽略字符宽度。例如,日语片假名字符可以写为全角或半角形式;如果选择该值,则认为写为全角形式的片假名字符等于写为半角形式的同一字符。
Public field Static Supported by the .NET Compact Framework Null 表示可分配给 SqlString 结构实例的 Value 属性的空值。

页首

公共属性

  名称 说明
Public property Supported by the .NET Compact Framework CompareInfo 获取 CompareInfo 对象,该对象定义如何对此 SqlString 结构执行字符串比较。
Public property Supported by the .NET Compact Framework CultureInfo 获取 CultureInfo 结构,它表示有关此 SqlString 对象的区域性信息。
Public property Supported by the .NET Compact Framework IsNull 指示 SqlStringValue 是否为 Null
Public property Supported by the .NET Compact Framework LCID 指定 SqlString 结构的地理区域设置和语言。
Public property Supported by the .NET Compact Framework SqlCompareOptions 一个或多个 SqlCompareOptions 枚举值的组合,它们表示此 SqlString 与其他 SqlString 结构的比较方式。
Public property Supported by the .NET Compact Framework Value 获取存储在此 SqlString 结构中的字符串。此属性为只读。

页首

公共方法

(请参见 受保护的方法 )

  名称 说明
Public method Static Supported by the .NET Compact Framework Add 串联两个指定的 SqlString 值以创建一个新的 SqlString 结构。
Public method Supported by the .NET Compact Framework Clone 创建此 SqlString 对象的一个副本。
Public method Static Supported by the .NET Compact Framework CompareOptionsFromSqlCompareOptions 获取与指定 SqlCompareOptions 值等效的 CompareOptions 枚举。
Public method Supported by the .NET Compact Framework CompareTo 已重载。 将此实例与指定对象进行比较并返回一个对二者的相对值的指示。
Public method Static Supported by the .NET Compact Framework Concat 串联两个指定的 SqlString 结构。
Public method Supported by the .NET Compact Framework Equals 已重载。 已重写。 对两个结构执行逻辑比较,以确定它们是否相等。
Public method Supported by the .NET Compact Framework GetHashCode 已重写。 获取此实例的哈希代码。
Public method Supported by the .NET Compact Framework GetNonUnicodeBytes 获取字节的数组,其中包含 SqlString ANSI 格式的内容。
Public method Supported by the .NET Compact Framework GetType  获取当前实例的 Type。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework GetUnicodeBytes 获取字节的数组,其中包含 SqlString Unicode 格式的内容。
Public method Static Supported by the .NET Compact Framework GetXsdType 返回指定的 XmlSchemaSet 的 XML 架构定义语言 (XSD)。
Public method Static Supported by the .NET Compact Framework GreaterThan 对两个 SqlString 操作数执行逻辑比较,以确定第一个操作数是否大于第二个操作数。
Public method Static Supported by the .NET Compact Framework GreaterThanOrEqual 对两个 SqlString 操作数执行逻辑比较,以确定第一个操作数是否大于或等于第二个操作数。
Public method Static Supported by the .NET Compact Framework LessThan 对两个 SqlString 操作数执行逻辑比较,以确定第一个操作数是否小于第二个操作数。
Public method Static Supported by the .NET Compact Framework LessThanOrEqual 对两个 SqlString 操作数执行逻辑比较,以确定第一个操作数是否小于或等于第二个操作数。
Public method Static Supported by the .NET Compact Framework NotEquals 对两个 SqlString 操作数执行逻辑比较,以确定它们是否不相等。
Public method Static Supported by the .NET Compact Framework op_Addition 串联两个指定的 SqlString 结构。
Public method Static Supported by the .NET Compact Framework op_Equality 对两个 SqlString 操作数执行逻辑比较,以确定它们是否相等。
Public method Static Supported by the .NET Compact Framework op_Explicit 已重载。 转换为 SqlString 及从 SqlString 转换。
Public method Static Supported by the .NET Compact Framework op_GreaterThan 对两个 SqlString 操作数执行逻辑比较,以确定第一个操作数是否大于第二个操作数。
Public method Static Supported by the .NET Compact Framework op_GreaterThanOrEqual 对两个 SqlString 操作数执行逻辑比较,以确定第一个操作数是否大于或等于第二个操作数。
Public method Static Supported by the .NET Compact Framework op_Implicit String 参数转换为 SqlString
Public method Static Supported by the .NET Compact Framework op_Inequality 对两个 SqlString 操作数执行逻辑比较,以确定它们是否不相等。
Public method Static Supported by the .NET Compact Framework op_LessThan 对两个 SqlString 操作数执行逻辑比较,以确定第一个操作数是否小于第二个操作数。
Public method Static Supported by the .NET Compact Framework op_LessThanOrEqual 对两个 SqlString 操作数执行逻辑比较,以确定第一个操作数是否小于或等于第二个操作数。
Public method Static Supported by the .NET Compact Framework ReferenceEquals  确定指定的 Object 实例是否是相同的实例。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework ToSqlBoolean 将此 SqlString 结构转换为 SqlBoolean
Public method Supported by the .NET Compact Framework ToSqlByte 将此 SqlString 结构转换为 SqlByte
Public method Supported by the .NET Compact Framework ToSqlDateTime 将此 SqlString 结构转换为 SqlDateTime
Public method Supported by the .NET Compact Framework ToSqlDecimal 将此 SqlString 结构转换为 SqlDecimal
Public method Supported by the .NET Compact Framework ToSqlDouble 将此 SqlString 结构转换为 SqlDouble
Public method Supported by the .NET Compact Framework ToSqlGuid 将此 SqlString 结构转换为 SqlGuid
Public method Supported by the .NET Compact Framework ToSqlInt16 将此 SqlString 结构转换为 SqlInt16
Public method Supported by the .NET Compact Framework ToSqlInt32 将此 SqlString 结构转换为 SqlInt32
Public method Supported by the .NET Compact Framework ToSqlInt64 将此 SqlString 结构转换为 SqlInt64
Public method Supported by the .NET Compact Framework ToSqlMoney 将此 SqlString 结构转换为 SqlMoney
Public method Supported by the .NET Compact Framework ToSqlSingle 将此 SqlString 结构转换为 SqlSingle
Public method Supported by the .NET Compact Framework ToString 已重写。 将 SqlString 对象转换为 String

页首

受保护的方法

  名称 说明
Protected method Supported by the .NET Compact Framework Finalize  允许 Object 在“垃圾回收”回收 Object 之前尝试释放资源并执行其他清理操作。 (从 Object 继承。)
Protected method Supported by the .NET Compact Framework MemberwiseClone  创建当前 Object 的浅表副本。 (从 Object 继承。)

页首

显式接口实现

  名称 说明
Explicit interface implementation Method Supported by the .NET Compact Framework System.Xml.Serialization.IXmlSerializable.GetSchema 该成员支持 .NET Framework 结构,不应从代码直接使用。
Explicit interface implementation Method Supported by the .NET Compact Framework System.Xml.Serialization.IXmlSerializable.ReadXml 该成员支持 .NET Framework 结构,不应从代码直接使用。
Explicit interface implementation Method Supported by the .NET Compact Framework System.Xml.Serialization.IXmlSerializable.WriteXml 该成员支持 .NET Framework 结构,不应从代码直接使用。

页首

请参见

参考

SqlString 结构
System.Data.SqlTypes 命名空间
CurrentCulture

其他资源

使用 SqlTypes