0

What is wrong with my code? Am told the name love doesnt exist in the current context

string name = love; int cars= 2; Console.WriteLine("My name is {0} and i own {1}", name, cars);

12th Aug 2019, 6:12 AM
DataStream Cowboy
DataStream Cowboy - avatar
2 Antworten
+ 1
love should be text, right? That's called a string. Strings are always in single (') or double (") quotation marks. So do: string name = "love"
12th Aug 2019, 6:25 AM
Paul Grasser
Paul Grasser - avatar
+ 1
Yes , i came to figure out later...thanks bye the way programming is though for me
12th Aug 2019, 6:27 AM
DataStream Cowboy
DataStream Cowboy - avatar