当我在我的项目中复制此代码时,我得到变量“store” [英] when i was copying this code in my project then i dint get the variable "store"
本文介绍了当我在我的项目中复制此代码时,我得到变量“store”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
private void dataGridView1_CellValueNeeded(object sender,
DataGridViewCellValueEventArgs e)
{
if (store.ContainsKey(e.RowIndex))
{
// Use the store if the e value has been modified
// and stored.
e.Value = store[e.RowIndex];
}
推荐答案
商店
不是一个功能它是一个数组/索引器到数据源。
右键单击Visual Studio中的单词,然后选择转到定义以查看类型。
store
is not a function it is an array/indexer to a data source.
Right click on the word in Visual Studio and select "Go To Definition" to see what the type is.
如果你复制并粘贴了那个方法,你错过了名为store的成员。看起来它被声明为字典< int,Int>
。
If you copy and pasted that method, you missed out the member called store. It looks like it was declared as a Dictionary<int, Int>
.
这篇关于当我在我的项目中复制此代码时,我得到变量“store”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文