CSharp examples for System:Converter
Convert double and int To Bool
using System.Globalization; using System.Drawing; using System;//from w w w . j a va 2 s .c o m public class Main{ public static bool ToBool(this double value) { return Math.Abs(value) > Epsilon; } public static bool ToBool(this int value) { return value != 0; } }