如何获取发件人的数值? [英] How do I get the numerical value on a sender?
本文介绍了如何获取发件人的数值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在数组arrayCheck [0到7]中有6个checkBox启用/禁用每一个
textBlabla [0到7],checkBlabla [0到7]
我想要完成的事情:
I have 6 checkBox in an array arrayCheck[0 to 7] enabling/Disabling each some
textBlabla[0 to 7], checkBlabla[0 to 7]
what I try to accomplish:
Common_arrayCheckChanged(object sender, EventArgs e){
if((CheckBox)sender.checked){
textBlabla[????].enabled = "true";
checkBlabla[???].enabled = "true";
}
else{
textBlabla[????].enabled = "false";
checkBlabla[???].enabled = "false";
}
}
那么如何获得索引[? ??来自发件人?
或者Baybe有更好的解决方案吗?
So how do I get the index [???] from the sender?
Or baybe there is a better solution?
推荐答案
我想我发现但是我的数组是2D的
所以我无法使用这个
int index = Array.IndexOf(MyObject,(TheObjectClass)sender);
I think I found but my array is a 2D
so I cant use this
int index = Array.IndexOf(MyObject, (TheObjectClass)sender);
这篇关于如何获取发件人的数值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文