OracleString 結構

定義

表示要儲存在資料庫或自資料庫擷取之字元的可變長度資料流。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
繼承
OracleString
實作

範例

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 類別的新執行個體,並指定要儲存的字串。Initializes a new instance of the OracleString class and specifies the string to store.

欄位

Empty

表示可以指派至 Value 結構之執行個體的 OracleString 屬性的空字串。Represents an empty string that can be assigned to the Value property of an instance of the OracleString structure.

Null

代表 null 値,可將該値指派給 Value 結構之執行個體的 OracleString 屬性。Represents a null value that can be assigned to the Value property of an instance of the OracleString structure.

屬性

IsNull

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

Item[Int32]

從位於整數參數 index 所指示之位置的 Value 屬性中取得單一位元組。Gets the single byte from the Value property located at the position indicated by the integer parameter, index.

Length

取得儲存在這個 OracleString 結構中的字串長度。Gets the length of the string that is stored in this OracleString structure.

Value

取得儲存在 OracleString 結構中的字串。Gets the string that is stored in the OracleString structure.

方法

CompareTo(Object)

比較 OracleString 的這個執行個體與提供的物件,並傳回它們相對值的指示。Compares this instance of OracleString to the supplied object and returns an indication of their relative values.

Concat(OracleString, OracleString)

將兩個指定的 OracleString 結構串連在一起。Concatenates the two specified OracleString structures.

Equals(Object)

將提供的物件參數與 Value 物件的 OracleString 屬性相比較。Compares the supplied object parameter to the Value property of the OracleString object.

Equals(OracleString, OracleString)

執行兩個 OracleString 運算元的邏輯比對,判斷它們是否相等。Performs a logical comparison of the two OracleString operands to determine if they are equal.

GetHashCode()

取得這個執行個體的雜湊程式碼。Gets the hash code for this instance.

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)

執行兩個 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)

執行兩個 OracleString 運算元的邏輯比對,判斷第一個運算元是否小於第二個。Performs a logical comparison of the two OracleString operands to determine if the first is less than the second.

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)

執行兩個 OracleString 運算元的邏輯比對,判斷它們是否不相等。Performs a logical comparison of the two OracleString operands to determine if they are not equal.

ToString()

OracleString 物件轉換成 StringConverts an OracleString object to a String.

運算子

Addition(OracleString, OracleString)

將兩個指定的 OracleString 結構串連在一起。Concatenates the two specified OracleString structures.

Equality(OracleString, OracleString)

執行兩個 OracleString 運算元的邏輯比對,判斷它們是否相等。Performs a logical comparison of the two OracleString operands to determine if they are equal.

Explicit(OracleString to String)

OracleString 轉換成 StringConverts an OracleString to a String.

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)

執行兩個 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)

String 參數轉換成 OracleStringConverts the String parameter to an OracleString.

Inequality(OracleString, OracleString)

執行兩個 OracleString 運算元的邏輯比對,判斷它們是否相等。Performs a logical comparison of the two OracleString operands to determine if they are equal.

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)

執行兩個 OracleString 運算元的邏輯比對,判斷第一個運算元是否小於或等於第二個。Performs a logical comparison of the two OracleString operands to determine if the first is less than or equal to the second.

適用於