Unexpected character error in C# while copy code from word file in visual studio 2019

  Uncategorised

Unexpected character error in C# while copy code from word file in visual studio 2019

i just copy a code from word file
i use the same code in other visual studio versions and works fine

the problem i didn’t found any errors

i followed some suggestions related to clean project – empty appdata but not worked

the code is very simple like this

public class Teacher 
‎{ 
‎    public int TeacherId { get; set; } 
‎    public string Code { get; set; } 
‎    public string Name { get; set; } 
‎} ‎
public class Student 
‎{ 
‎    public int StudentId { get; set; } 
‎    public string Code { get; set; } 
‎    public string Name { get; set; } 
‎    public string EnrollmentNo { get; set; } 
‎}‎

enter image description here

rewring the code manual takes time and also i want to know the reason as i didn’t found any related reasons avaiable on my online search

Source: Visual Studio Questions

LEAVE A COMMENT