myDictionary.Add(1, button1);
myDictionary.Add(2, button2);
myDictionary.Add(3, button3);
myDictionary.Add(4, button4);如果有好多那怎么办?
myDictionary.Add(2, button2);
myDictionary.Add(3, button3);
myDictionary.Add(4, button4);如果有好多那怎么办?
楼上高手
我真服你们了。
对象的 TAG (标记/备注)属性是放在那里放鸽子的?
还非要用个二维泛型模版
button1.Tag = 0x1;
// 这样放一个不就行了吗 Dictionary<int,Button>
// 用这个Net在内存中分配时候
// 还要复制这个类模型到内存寄存器中
// 无故浪费内存。真的是电脑内存大了。软件就该....
// 如果你是用的类本身不带 TAG 类型,但必须通过索引可以采用如下模版
/// 但如果自身就有 TAG 属性。还这些那就是无故浪费内存。、
Dictionary<int, string> str;