gpt4 book ai didi

c# - 字符串连接 Visual Studio 2019 上的 int.ToString() 错误

转载 作者:行者123 更新时间:2023-11-30 13:53:28 25 4
gpt4 key购买 nike

在我将我的 Visual Studio 2019 从 v16.2.5 更新到 v16.3.5 之后,我的应用程序在我使用字符串连接的每个地方都出现了一些错误。

例如:

int x = 5;
string y = x + " years";

有什么变化?文化如何影响智力? enter image description here

最佳答案

我认为您可能已经勾选了将警告视为错误单选按钮。

int 可以用西方数字(0、1、2、3、... 9)显示,也可以用其他数字显示,例如阿拉伯语(٠ ١ ٢ ٣)或泰语(๑ ๒ ๓)和等等。

因此,int 表示依赖于文化,因此会产生错误。

有关更多信息,请查看 official documentation.

关于c# - 字符串连接 Visual Studio 2019 上的 int.ToString() 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58729451/

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