如何获取DropDownList中某个item对应的index

2025-04-29 18:11:24
推荐回答(2个)
回答1:

你定义个全局变量,如果你只在 DropDownList1_SelectedIndexChanged中定义了一个变量 ,这个变量的作用域,只在这个事件中,在其他方法,或事件中不会被引用

回答2:

collectionView用indexPath.itemtableView用indexPath.row