CSharp examples for System:Boolean
Compare Boolean Object
using Microsoft.SharePoint; using System.Text; using System.Linq; using System.Globalization; using System.Data; using System.Collections.Generic; using System.Collections; using System;/* www . j ava2 s .co m*/ public class Main{ public static bool CompareBooleanObject(object x, object y) { if (ReferenceEquals(x, y)) { return true; } if (!(x is bool) || !(y is bool)) { return false; } return (bool) x == (bool) y; } }