在C#中字符串前面的@是什麼? - What's the @ in front of a string in C#?

問題:

This is a .NET question for C# (or possibly VB.net), but I am trying to figure out what's the difference between the following declarations: 這是C#(或可能是VB.net)的.NET問題,但我試圖找出以下聲明之間的區別:

string hello = "hello";

vs.

string hello_alias = @"hello";

Printing out on the console makes no difference, the length properties are the same. 在控制檯上打印沒有區別,長度屬性是相同的。


解決方案:

參考一: https://en.stackoom.com/question/2Kft
參考二: https://stackoom.com/question/2Kft
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章