Represents a variable-length stream of characters to be stored in or retrieved from the database. System.Data.SqlTypes.SqlString has a different underlying data structure from its corresponding .NET Framework string data type.
See Also: SqlString Members
string always uses the default System.Globalization.CultureInfo from the current thread, but System.Data.SqlTypes.SqlString contains its own locale Id and compare flags. The comparison result of two System.Data.SqlTypes.SqlString structures is independent of operating system and current thread locale.
When you use System.Data.SqlTypes.SqlString comparison operators, note that if the LCIDs of arguments are different, comparison functions throw an exception because they cannot be compared. For example, the statement
SqlString mySqlString = new SqlString("abc");
is equivalent to
SqlString mySqlString = new SqlString("abc", CultureInfo.CurrentCulture.LCID);