0

I'm getting this unexpected character '' error on this code:

 _timer = new Timer(1000){ AutoReset = true };‬

 _timer.Elapsed += TimerElapsed;
Leo Chapiro
  • 13,678
  • 8
  • 61
  • 92
  • 1
    Possible duplicate of [Why do I get an CS1056 Unexpected character '' on this code](https://stackoverflow.com/questions/31577120/why-do-i-get-an-cs1056-unexpected-character-on-this-code) – Peter B Oct 25 '19 at 12:40

1 Answers1

3

Copying the ; character from the end of your line into this ASCII value checker you can see that there are 8 characters there in total. Seems like there are some non-rendered characters after the ; (‬, not sure what it could be or where this came from).
Just delete it and retype a normal ; character. Make sure to delete everything between the ; and the line break to get rid of all the invisible characters.

pappbence96
  • 1,164
  • 2
  • 12
  • 20