I'm brand new, and just started C# for Dummies.
I've also put together a list of websites with code snippets and
tutorials.
If I cut-and-paste the following line from an example into Visual
Studio, I get errors.
Console.WriteLine(“Enter your name, please:”);
If I manually type the " and ( ) characters, it gets rid of the
errors.
Why is this? Can it be avoided? I had planned on being able to doa
lot of cut-and-pasting as I learn code.
There are different kinds of quotes which differ both visually and in
character code, and this can be confusing as Visual Studio (and many
other IDEs) accept only a certain kind, the type that your keyboard
produces by default. I cut and paste code from websites every now and
then, yet I've run into this issue only once. I'd say that the problem
lies with the site you're copying from. Send them feedback about this
issue - I'm sure they're glad to hear their code snippets don't work
directly with VS and will hopefully fix the issue.
TEPPO ARNIVUO TAINA HAIKO PASI TENKANEN
ILKKA TUOVINEN KALLE PAAJANEN JYRKI HARKKI
OIVA AINOLA IIKKA PAAVOLAINEN MANNE ALANDER