gpt4 book ai didi

c# - c#中新关键字下的省略号?

转载 作者:行者123 更新时间:2023-11-30 21:41:42 25 4
gpt4 key购买 nike

Why is there ellipses underneath the new keyword?

为什么new关键字下面有省略号。无法在互联网上找到任何文章。在多个实例中,我以完全相同的方法使用了 new 关键字。除了这一个,其他看起来都很正常。

编辑 - 我使用的是 Visual Studio 2017 社区版。为 UWP 开发。代码运行良好,没有显示为错误。按 ctrl+。什么都不给。

最佳答案

我猜它是在告诉您可以使用 object initializer .所以如果你有这样的代码

FolderPicker pickFolder = new FolderPicker();
folderPicker.SuggestedStartLocation = PickerLocationId.Desktop;
folderPicker.CommitButtonText = "Take it!";

Visual Studio 推荐使用这个

FolderPicker pickFolder = new FolderPicker
{
SuggestedStartLocation = PickerLocationId.Desktop,
CommitButtonText = "Take it!"
};

相反。

关于c# - c#中新关键字下的省略号?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43071736/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com