simpleSound = new SoundPlayer(@"c:\Windows\Media\chimes.wav");
Why and what is the @ for?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s a literal string. Instead of having to escape the “\” by putting two of them “\” the compiler interprets the string “as is”.
Say you wanted to print out the following text to the screen:
"Hello \t world".If you were to just do
Console.WriteLine("Hello \t world"), then your output would be:notice the tab. That’s because \t is interperted as a tab. If you use the literal though, like this:
then your output would be: