Alan.
On 11/15/06, Raja R Harinath
<[EMAIL PROTECTED]> wrote:
Hi,
"Matthijs ter Woord" <[EMAIL PROTECTED]> writes:
> In the attached diff file, is a change for implementing the == and !=
> operators of System.Transactions.Transaction.
>
> Please review and commit...
>
> Index: Transaction.cs
> ===================================================================
> --- Transaction.cs (revision 67816)
> +++ Transaction.cs (working copy)
> @@ -57,6 +57,7 @@
> internal Transaction (Transaction other)
> {
> level = other.level;
> +
> info = other.info;
> dependents = other.dependents;
> }
> @@ -198,15 +199,20 @@
> }
>
> [MonoTODO]
> - public static bool op_Inequality (Transaction x, Transaction y)
> + public static bool operator != (Transaction x, Transaction y)
> {
> - if (x == null && y == null)
> - return false;
> - if (x == null || y == null)
> + if ((x as object) == null && (y as object) == null)
> + return false;
I'd prefer
ReferenceEquals (x, null)
instead. Also, please use the proper indentation.
- Hari
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
_______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list