Can I assign 1 or 0 into bool variable?
static void Main(string[] args)
{
bool b = 1;
Console.WriteLine(b);
Console.ReadLine();
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Manav PandyaRank #166 · 14.3K reputationPosted Mar 30, 2018, 7:21 PM EDT
Rafnas T PRank #280 · 8.8K reputationPosted Mar 30, 2018, 11:36 PM EDT
Hariharan KrishnanRank #725 · 3.2K reputationPosted Mar 30, 2018, 6:25 PM EDT
Nanddeep NachanRank #38 · 35.2K reputationPosted Apr 2, 2018, 9:09 PM EDT