public static IsNull ( object x ) : bool | ||
x | object | |
Результат | bool |
public static int Compare(ClientVersion a, ClientVersion b) { if (ClientVersion.IsNull(a) && ClientVersion.IsNull(b)) { return(0); } if (ClientVersion.IsNull(a)) { return(-1); } if (ClientVersion.IsNull(b)) { return(1); } return(a.CompareTo(b)); }
public int Compare(object x, object y) { if (ClientVersion.IsNull(x) && ClientVersion.IsNull(y)) { return(0); } if (ClientVersion.IsNull(x)) { return(-1); } if (ClientVersion.IsNull(y)) { return(1); } ClientVersion version1 = (x as ClientVersion); ClientVersion version2 = (y as ClientVersion); if (ClientVersion.IsNull(version1) || ClientVersion.IsNull(version2)) { throw new ArgumentException(); } return(version1.CompareTo(version2)); }