true if value is not zero; otherwise, false.
The following example demonstrates converting long values to bool values.
C# Example
using System; class ConvertBoolTest { static public void Main() { long long0 = 0; long long1 = 1; long long2 = -2; bool bool0 = Convert.ToBoolean(long0); bool bool1 = Convert.ToBoolean(long1); bool bool2 = Convert.ToBoolean(long2); Console.WriteLine("(long) {0} as bool = {1}",long0,bool0); Console.WriteLine("(long) {0} as bool = {1}",long1,bool1); Console.WriteLine("(long) {0} as bool = {1}",long2,bool2); } }
The output is
(long) 0 as bool = False