Cannot Implicitly convert string to bool. Please help | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Cannot Implicitly convert string to bool. Please help

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { string yourName; Console.WriteLine("What is your name?"); yourName = Console.ReadLine(); if (yourName="Jason") Console.WriteLine("You're bronze five trash."); else Console.WriteLine("You are a kewl kid"); } } }

24th Mar 2017, 4:15 AM
Scott Lee
Scott Lee - avatar
0 Answers