c#-7.1

    8熱度

    1回答

    C#7.1引入了一個名爲「Default Literals」的新功能,該功能允許使用新的default表達式。 // instead of writing Foo x = default(Foo); // we can just write Foo x = default; 對於Nullable<T>類型,默認值是null,並與通常使用這種按預期工作: int? x = default

    5熱度

    4回答

    要與Visual Studio 2017年使用新的C# 7.1 language features,您添加設置<LangVersion>latest</LangVersion>到您的項目文件(S)。 然而,建立這樣的項目MSBuild中的錯誤(15.3.409.57025版本,位於C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterpr