gpt4 book ai didi

c# - 在本地窗口中更改 T 类型 int

转载 作者:太空狗 更新时间:2023-10-29 23:36:55 25 4
gpt4 key购买 nike

我无法从本地或即时窗口更改此“值”变量。怎么了? T 不是运行时的 int 吗? Whats wrong?

http://im2.ezgif.com/tmp/ezgif-3735159626.gif

我也不能改变 _value。我认为这是一个 bug 还是什么?

    class Program
{
static void Main(string[] args)
{
Just<int> just = new Just<int>();
just.Try(5);
}
}
class Just<T>
{
private T _value;
public void Try(T value)
{
this._value = value;
}
}

Beside using this, tried to use instance of Just, worked fine

enter image description here

最佳答案

这是表达式计算器中的一个已知错误。有一个 GitHub 问题跟踪此错误 here

关于c# - 在本地窗口中更改 T 类型 int,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40076575/

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