OracleString OracleString OracleString OracleString Struct

定义

表示要存储在数据库中或从数据库中检索的字符的可变长度流。Represents a variable-length stream of characters to be stored in or retrieved from the database.

public value class OracleString : IComparable, System::Data::SqlTypes::INullable
public struct OracleString : IComparable, System.Data.SqlTypes.INullable
type OracleString = struct
    interface INullable
Public Structure OracleString
Implements IComparable, INullable
继承
OracleStringOracleStringOracleStringOracleString
实现

示例

using System;  
using System.Data.OracleClient;  
public class Class1 {  
   public static void Main() {  
      OracleString oraclestring1 = new OracleString("MyOracleString1");  
      OracleString oraclestring2 = new OracleString("MyOracleString2");  
      OracleString oraclestring3 = new OracleString("MyOracleString1");  

      // Type: System.Data.OracleClient.OracleString  
      Console.WriteLine("Type: " + oraclestring1.GetType());  

      // Length: 15  
      Console.WriteLine("Length: " + oraclestring1.Length);  

      // False  
      Console.WriteLine(oraclestring1.IsNull);  

      // -1  
      Console.WriteLine(oraclestring1.CompareTo(oraclestring2));  

      // 0  
      Console.WriteLine(oraclestring1.CompareTo(oraclestring3));  

      // 1  
      Console.WriteLine(oraclestring2.CompareTo(oraclestring3));  

      // False  
      Console.WriteLine(oraclestring1.Equals(oraclestring2));  

      // True  
      Console.WriteLine(oraclestring1.Equals(oraclestring3));  

      // MyOracleString1  
      Console.WriteLine(oraclestring1.Value);  

      // MyOracleString2  
      Console.WriteLine(oraclestring2.ToString());  
   }  
}  

注解

若要获取OracleString对象,请调用GetOracleString方法。To obtain an OracleString object, call the GetOracleString method.

构造函数

OracleString(String) OracleString(String) OracleString(String) OracleString(String)

初始化 OracleString 类的新实例,并指定要存储的字符串。Initializes a new instance of the OracleString class and specifies the string to store.

字段

Empty Empty Empty Empty

表示可分配给 Value 结构实例的 OracleString 属性的空字符串。Represents an empty string that can be assigned to the Value property of an instance of the OracleString structure.

Null Null Null Null

表示可分配给 Value 结构实例的 OracleString 属性的 null 值。Represents a null value that can be assigned to the Value property of an instance of the OracleString structure.

属性

IsNull IsNull IsNull IsNull

指示 ValueOracleString 是否为 NullIndicates whether the Value of the OracleString is Null.

Item[Int32] Item[Int32] Item[Int32] Item[Int32]

Value 属性获取单字节,该属性位于整数参数 index 指示的位置。Gets the single byte from the Value property located at the position indicated by the integer parameter, index.

Length Length Length Length

获取存储在此 OracleString 结构中的字符串的长度。Gets the length of the string that is stored in this OracleString structure.

Value Value Value Value

获取存储在此 OracleString 结构中的字符串。Gets the string that is stored in the OracleString structure.

方法

CompareTo(Object) CompareTo(Object) CompareTo(Object) CompareTo(Object)

OracleString 的此实例与所提供的对象进行比较,并返回其相对值的指示值。Compares this instance of OracleString to the supplied object and returns an indication of their relative values.

Concat(OracleString, OracleString) Concat(OracleString, OracleString) Concat(OracleString, OracleString) Concat(OracleString, OracleString)

串连两个指定的 OracleString 结构。Concatenates the two specified OracleString structures.

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

将提供的对象参数与 Value 对象的 OracleString 属性进行比较。Compares the supplied object parameter to the Value property of the OracleString object.

Equals(OracleString, OracleString) Equals(OracleString, OracleString) Equals(OracleString, OracleString) Equals(OracleString, OracleString)

对两个 OracleString 操作数执行逻辑比较,以确定它们是否相等。Performs a logical comparison of the two OracleString operands to determine if they are equal.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

获取此实例的哈希代码。Gets the hash code for this instance.

GreaterThan(OracleString, OracleString) GreaterThan(OracleString, OracleString) GreaterThan(OracleString, OracleString) GreaterThan(OracleString, OracleString)

对两个 OracleString 操作数执行逻辑比较,以确定第一个操作数是否大于第二个操作数。Performs a logical comparison of the two OracleString operands to determine if the first is greater than the second.

GreaterThanOrEqual(OracleString, OracleString) GreaterThanOrEqual(OracleString, OracleString) GreaterThanOrEqual(OracleString, OracleString) GreaterThanOrEqual(OracleString, OracleString)

对两个 OracleString 操作数执行逻辑比较,以确定第一个操作数是否大于或等于第二个操作数。Performs a logical comparison of the two OracleString operands to determine if the first is greater than or equal to the second.

LessThan(OracleString, OracleString) LessThan(OracleString, OracleString) LessThan(OracleString, OracleString) LessThan(OracleString, OracleString)

对两个 OracleString 操作数执行逻辑比较,以确定第一个操作数是否小于第二个操作数。Performs a logical comparison of the two OracleString operands to determine if the first is less than the second.

LessThanOrEqual(OracleString, OracleString) LessThanOrEqual(OracleString, OracleString) LessThanOrEqual(OracleString, OracleString) LessThanOrEqual(OracleString, OracleString)

对两个 OracleString 操作数执行逻辑比较,以确定第一个操作数是否小于或等于第二个操作数。Performs a logical comparison of the two OracleString operands to determine if the first is less than or equal to the second.

NotEquals(OracleString, OracleString) NotEquals(OracleString, OracleString) NotEquals(OracleString, OracleString) NotEquals(OracleString, OracleString)

对两个 OracleString 操作数执行逻辑比较,确定它们是否相等。Performs a logical comparison of the two OracleString operands to determine if they are not equal.

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

OracleString 对象转换为 StringConverts an OracleString object to a String.

操作员

Addition(OracleString, OracleString) Addition(OracleString, OracleString) Addition(OracleString, OracleString) Addition(OracleString, OracleString)

串连两个指定的 OracleString 结构。Concatenates the two specified OracleString structures.

Equality(OracleString, OracleString) Equality(OracleString, OracleString) Equality(OracleString, OracleString) Equality(OracleString, OracleString)

对两个 OracleString 操作数执行逻辑比较,以确定它们是否相等。Performs a logical comparison of the two OracleString operands to determine if they are equal.

Explicit(OracleString to String) Explicit(OracleString to String) Explicit(OracleString to String) Explicit(OracleString to String)

OracleString 转换为 StringConverts an OracleString to a String.

GreaterThan(OracleString, OracleString) GreaterThan(OracleString, OracleString) GreaterThan(OracleString, OracleString) GreaterThan(OracleString, OracleString)

对两个 OracleString 操作数执行逻辑比较,以确定第一个操作数是否大于第二个操作数。Performs a logical comparison of the two OracleString operands to determine if the first is greater than the second.

GreaterThanOrEqual(OracleString, OracleString) GreaterThanOrEqual(OracleString, OracleString) GreaterThanOrEqual(OracleString, OracleString) GreaterThanOrEqual(OracleString, OracleString)

对两个 OracleString 操作数执行逻辑比较,以确定第一个操作数是否大于或等于第二个操作数。Performs a logical comparison of the two OracleString operands to determine if the first is greater than or equal to the second.

Implicit(String to OracleString) Implicit(String to OracleString) Implicit(String to OracleString) Implicit(String to OracleString)

String 参数转换为 OracleStringConverts the String parameter to an OracleString.

Inequality(OracleString, OracleString) Inequality(OracleString, OracleString) Inequality(OracleString, OracleString) Inequality(OracleString, OracleString)

对两个 OracleString 操作数执行逻辑比较,以确定它们是否相等。Performs a logical comparison of the two OracleString operands to determine if they are equal.

LessThan(OracleString, OracleString) LessThan(OracleString, OracleString) LessThan(OracleString, OracleString) LessThan(OracleString, OracleString)

对两个 OracleString 操作数执行逻辑比较,以确定第一个操作数是否小于第二个操作数。Performs a logical comparison of the two OracleString operands to determine if the first is less than the second.

LessThanOrEqual(OracleString, OracleString) LessThanOrEqual(OracleString, OracleString) LessThanOrEqual(OracleString, OracleString) LessThanOrEqual(OracleString, OracleString)

对两个 OracleString 操作数执行逻辑比较,以确定第一个操作数是否小于或等于第二个操作数。Performs a logical comparison of the two OracleString operands to determine if the first is less than or equal to the second.

适用于