gpt4 book ai didi

c# - 枚举作为通用约束 : What's the Reason Microsoft Didn't Want to Implement It?

转载 作者:行者123 更新时间:2023-12-02 16:17:21 25 4
gpt4 key购买 nike

我意识到enum不能用作通用约束,并且Microsoft has declined to fix this bug

有什么理由吗?

最佳答案

您发布的链接说明了原因:

and is a somewhat arbitrary limitation of the language

可能会改变:

If we ever reopen constraints as a feature, this will be one of the things we will reevaluate. For the upcoming release we don't have the opportunity to add any more language features, so you'll see this resolved as "Won't Fix", but it remains on our lists for future consideration.

关于c# - 枚举作为通用约束 : What's the Reason Microsoft Didn't Want to Implement It?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2680801/

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