[UWP] [C#] C#中的新功能正在Build中演示......我们如何在应用程序中使用它们? [英] [UWP][C#]With the great new features in C# being demo'd at Build...how do we use them in an app?

查看:86
本文介绍了[UWP] [C#] C#中的新功能正在Build中演示......我们如何在应用程序中使用它们?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在
//构建网站,我喜欢新的C#功能。我无法弄清楚如何在UWP应用程序中使用它们?没有任何东西可以让我设置C#版本号。


我可以设置UWP平台版本,但这只是设置可用的API,而不是C#语言功能,如新的跨度<> (我真的想用来制作一个非常快速的解析器)和数组切片语法。


在线我可以看到如何在非UWP项目上设置语言版本(你设置了项目属性中的明显属性),但不适用于UWP。

解决方案

您好,


如果你想为项目明确设置C#编译器版本,那么你可以做它项目属性(项目 - >属性 - >构建 - >高级 - >语言版本)。 


如果您想使用Span<>然后你应该安装 System.Memory NuGet包检查包括预发布。



I'm watching the BRK2155 The future of C# video on the //build site, and am loving the new C# features. What I can't figure out is how to use them in a UWP app? There isn't anything that lets me set the C# version number.

I can set the UWP platform version, but that just sets the APIs that are available, not the C# language features like the new Span<> (which I really want to use to make a very fast parser) and the array slicing syntax.

Online I can see how to set the language version on non-UWP projects (you set the obvious property in the project property), but not for UWP.

解决方案

Hello,

If you want explicitly set C# compiler version for project then you can do it it project properties (Project -> Properties -> Build -> Advanced -> Language Version). 

If you want use Span<> then you should install System.Memory NuGet package check include prerelease.


这篇关于[UWP] [C#] C#中的新功能正在Build中演示......我们如何在应用程序中使用它们?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆