+2002-11-03 Ville Palo <vi64pa@koti.soon.fi>
+
+ * System.Data.SqlTypes/SqlBinary.cs: Finished and no errors generated
+ by NUnitConsole_mono.exe
+
2002-11-03 Tim Coleman (tim@timcoleman.com)
* System.Data.SqlClient/SqlCommand.cs:
Use SET NO_BROWSETABLE ON when CommandBehavior is KeyInfo
{
if (!(value is SqlBinary))
return false;
+ else if (((SqlBinary)value).IsNull)
+ return false;
else
return (bool) (this == (SqlBinary)value);
}
public override string ToString ()
{
- string result = "";;
-
- foreach (char c in value)
- result += c;
-
- return result;
+ return "SqlBinary(" + value.Length + ")";
}
#endregion
int j = 0;
int i;
- for (i = 0; i < x.Value.Length; i++)
+ for (i = 0; i < x.Value.Length; i++)
b [i] = x.Value [i];
+
- for ( ; i < (x.Value.Length + y.Value.Length -1); i++) {
- b [i] = y.Value [0];
+ for (; i < (x.Value.Length + y.Value.Length); i++) {
+ b [i] = y.Value [j];
j++;
}
-
+
return new SqlBinary (b);
}
if (x.IsNull || y.IsNull)
return SqlBoolean.Null;
else
- return x.Value.Equals (y.Value);
+ return new SqlBoolean (Compare (x, y) == 0);
}
public static SqlBoolean operator > (SqlBinary x, SqlBinary y)
if (x.IsNull || y.IsNull)
return SqlBoolean.Null;
else
- return !x.Value.Equals (y.Value);
+ return new SqlBoolean (Compare (x, y) != 0);
}
public static SqlBoolean operator < (SqlBinary x, SqlBinary y)