int z = 10005;
bool a = Convert.ToBoolean(z);
Console.WriteLine(a);
Above code is giving output as :True . Pls explain why?
If i want as "False" what should i do?
I get usually confused with boolean data type or if any boolean is used in the program.
Pls explain easily for c sharp

Manav PandyaRank #166 · 14.3K reputationPosted Jan 23, 2018, 8:23 PM EST
Suraj KumarRank #353 · 7.1K reputationPosted Jan 23, 2018, 6:56 PM EST
Manav PandyaRank #166 · 14.3K reputationPosted Jan 23, 2018, 6:54 PM EST
harish reddy176 reputationPosted Jan 23, 2018, 7:41 PM EST