C# VS studio在调试期间不显示新变量的值
上课C# VS studio在调试期间不显示新变量的值,c#,visual-studio,C#,Visual Studio,上课 public class ABC { private wt; private nos; MyDictionary1; MyDictionary2; public void XYZ(some arguements) { // Dictionaries are populated here ( I can see the contents during debug) wt = MyDictionary1[arguements.key]; // wt
public class ABC
{
private wt;
private nos;
MyDictionary1;
MyDictionary2;
public void XYZ(some arguements)
{
// Dictionaries are populated here ( I can see the contents during debug)
wt = MyDictionary1[arguements.key]; // wt was added last week. shows value during debugging
no = MyDictionary1[arguements.key]; // Added no today, does not show value during debudding
}
}
控件不会对未指定值的行执行任何操作。但当我把它添加到手表中时,VS说“不”在当前上下文中并不存在。如果两个变量的声明和填充方式相同,我不知道为什么会发生这种情况。
有人能帮忙吗 清洁溶液,然后构建溶液。如果不起作用,请删除bin和obj文件夹,生成解决方案,然后重试。是否键入no==nos?请发布实际有效的代码。如果代码开头无效,很难判断问题可能在哪里。请将断点放在要执行的行之后,而不是它上面。因为它是方法中的最后一行,所以将断点放在方法的右大括号上。或者在命中断点后转到下一个语句。如果在发布模式下运行调试器,并且调试器优化了nos.private nos,也会发生这种情况。这是什么意思?型号在哪里?按原样粘贴代码。