Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
1985 | Dec 9,2002 01:13 PM UTC | Dec 9,2002 02:06 PM UTC | WinForms | 1 |
![]() |
Tags: GridControl |
///But if you use the static GridBorder.Empty member to flag 'null's, this code works./// The basic == operator. /// /// The left-hand side of the operator /// The right-hand side of the operator ////// bool /// public static bool operator==( GridBorder lhs, GridBorder rhs ) { if ((object) lhs == null || (object) rhs == null) return false; return lhs.Equals(rhs); } ////// The basic != operator /// /// The left-hand side of the operator /// The right-hand side of the operator ////// bool /// public static bool operator!=( GridBorder lhs, GridBorder rhs ) { if ((object) lhs == null || (object) rhs == null) return false; return !lhs.Equals(rhs); }
GridBorder border = GridBorder.Empty; Console.WriteLine("Border == null? " + (border == GridBorder.Empty )); Console.WriteLine("Border != null? " + (border != GridBorder.Empty ) );
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.