Export (0) Print
Expand All

OracleString Structure

Represents a variable-length stream of characters to be stored in or retrieved from the database.

Namespace:  System.Data.OracleClient
Assembly:  System.Data.OracleClient (in System.Data.OracleClient.dll)

public struct OracleString : IComparable, 
	INullable

The OracleString type exposes the following members.

  NameDescription
Public methodOracleStringInitializes a new instance of the OracleString class and specifies the string to store.
Top

  NameDescription
Public propertyIsNullIndicates whether the Value of the OracleString is Null.
Public propertyItemGets the single byte from the Value property located at the position indicated by the integer parameter, index.
Public propertyLengthGets the length of the string that is stored in this OracleString structure.
Public propertyValueGets the string that is stored in the OracleString structure.
Top

  NameDescription
Public methodCompareToCompares this instance of OracleString to the supplied object and returns an indication of their relative values.
Public methodStatic memberConcatConcatenates the two specified OracleString structures.
Public methodEquals(Object)Compares the supplied object parameter to the Value property of the OracleString object. (Overrides ValueType.Equals(Object).)
Public methodStatic memberEquals(OracleString, OracleString)Performs a logical comparison of the two OracleString operands to determine if they are equal.
Public methodGetHashCodeGets the hash code for this instance. (Overrides ValueType.GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodStatic memberGreaterThanPerforms a logical comparison of the two OracleString operands to determine if the first is greater than the second.
Public methodStatic memberGreaterThanOrEqualPerforms a logical comparison of the two OracleString operands to determine if the first is greater than or equal to the second.
Public methodStatic memberLessThanPerforms a logical comparison of the two OracleString operands to determine if the first is less than the second.
Public methodStatic memberLessThanOrEqualPerforms a logical comparison of the two OracleString operands to determine if the first is less than or equal to the second.
Public methodStatic memberNotEqualsPerforms a logical comparison of the two OracleString operands to determine if they are not equal.
Public methodToStringConverts an OracleString object to a String. (Overrides ValueType.ToString().)
Top

  NameDescription
Public operatorStatic memberAdditionConcatenates the two specified OracleString structures.
Public operatorStatic memberEqualityPerforms a logical comparison of the two OracleString operands to determine if they are equal.
Public operatorStatic memberExplicit(OracleString to String)Converts an OracleString to a String.
Public operatorStatic memberGreaterThanPerforms a logical comparison of the two OracleString operands to determine if the first is greater than the second.
Public operatorStatic memberGreaterThanOrEqualPerforms a logical comparison of the two OracleString operands to determine if the first is greater than or equal to the second.
Public operatorStatic memberImplicit(String to OracleString)Converts the String parameter to an OracleString.
Public operatorStatic memberInequalityPerforms a logical comparison of the two OracleString operands to determine if they are equal.
Public operatorStatic memberLessThanPerforms a logical comparison of the two OracleString operands to determine if the first is less than the second.
Public operatorStatic memberLessThanOrEqualPerforms a logical comparison of the two OracleString operands to determine if the first is less than or equal to the second.
Top

  NameDescription
Public fieldStatic memberEmptyRepresents an empty string that can be assigned to the Value property of an instance of the OracleString structure.
Public fieldStatic memberNullRepresents a null value that can be assigned to the Value property of an instance of the OracleString structure.
Top

To obtain an OracleString object, call the GetOracleString method.

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());
   }
}

.NET Framework

Supported in: 4.5.3, 4, 3.5, 3.0, 2.0, 1.1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft