What is a verbatim string ?
A verbatim string is a string which is having @ [ at ] character before starting of double quotation while declaring a string.
A verbatim string is mutable string.
A verbatim string is having dollar ( $ ) before starting a string.
None of the above.
A verbatim string is a string which is having @ symbol before string.
Verbatim string will treat all escape characters as part of a string .
string s = " C:\ skillgun \ questions.txt ";
the above string declaration will fail since back slash is not allowed directly inside a string and is an escape character . In order to print the above given string we have two ways
1. string s = " C:\\ skillgun \\ questions.txt ";
2. string s = @" C:\ skillgun \ questions.txt ";
Back To Top