Unrecognized escape sequence in SqlConnection constructor

Escape the \ character like :

SqlConnection con = new SqlConnection("Server=NEPOLEON\\ADMN;Database=MASTER;Trusted_Connection=True");

or

SqlConnection con = new SqlConnection(@"Server=NEPOLEON\ADMN;Database=MASTER;Trusted_Connection=True");

Try changing it to this:

SqlConnection con = new SqlConnection("Server=NEPOLEON\\ADMN;Database=MASTER;Trusted_Connection=True");

or this

SqlConnection con = new SqlConnection(@"Server=NEPOLEON\ADMN;Database=MASTER;Trusted_Connection=True");

In .NET you can escape special characters by either putting an @ in front of the string or using a special value to represent the character you want to escape. In this case you can use \\ to represent a \