一個簡單FAQ與解法 -- 啟用 C# 6 / VB 14 ( Enable C# 6 / VB 14 )
dotblogs.com.tw/mis2000lab/2016/11/23/string_interpolation_enable_csharp_6_vb_14_vs2015_vs2017
C# 6.0 新的作法,字串插值 (String Interpolation)
我已經是 VS 2015 Update 1與 VS 2017(目前仍是RC版),理論上早就是 .NET 4.6.2 & C# 6.0
為何使用這樣的寫法會報錯?

解決步驟如下:
倘若您用的是「專案」,那麼上方的 Menu 功能列 則請選擇「專案」

完成後,您可以發現網站、專案底下的 bin目錄多了一個DLL檔
Web.Config設定檔 與 Packages.config 檔都有新增一些設定值(如下圖)


參考資料: http://stackoverflow.com/questions/30832659/string-interpolation-in-a-razor-view
字串插值 (String Interpolation),可以參考這些文章的說明
想要學習 C#,微軟提供一個「從零學起」的 C# 範例網站,大推薦!!
C# 與 VB 語法互轉(轉換),強力推薦
******************************************************************************
特別推薦 超強力 C# & VB 語言轉換器!
******************************************************************************
我將思想傳授他人, 他人之所得,亦無損於我之所有;
猶如一人以我的燭火點燭,光亮與他同在,我卻不因此身處黑暗。----Thomas Jefferson

寫信給我-- mis2000lab (at) yahoo.com.台灣 或是 school (at) mis2000lab.net
................ facebook社團 https://www.facebook.com/mis2000lab ......................
................ Google+ https://plus.google.com/100202398389206570368/posts ........
................ YouTube (ASP.NET) 線上教學影片 http://goo.gl/rGLocQ
Blog文章 "附的範例" 無法下載,請看 這裡 ...... https://dotblogs.com.tw/mis2000lab/2016/03/14/2008_2015_mis2000lab_sample_download
請看我們的「售後服務」範圍(嚴格認定)。
......................................................................................................................................................
[遠距教學、教學影片] ASP.NET (Web Form) 課程 上線了!微軟MVP --MIS2000Lab.主講
事先錄製好的影片,並非上課時側錄! 觀看影片時,有如我「一對一」跟您面對面講課。
MIS2000 Lab. 線上教學影片(YouTube) **免費觀賞**
沒有留言:
張貼留言