假设我想做这样的事情:
With grid.Columns("Reviewed")
CType(<the with object>, DataGridViewCheckBoxColumn).ThreeState = False
...
End With基本上,我想在上述声明中提出以下几点:
CType(grid.Columns("Reviewed"), DataGridViewCheckBoxColumn).ThreeState = False是否有一些关键字可以用来指我是"WITH“的对象?
发布于 2012-07-19 18:02:42
据我所知,没有办法做到这一点,但取决于您将要做什么,它可能只是更容易使另一个变量引用该列。
Dim ReviewColumn as DataGridViewCheckBoxColumn = grid.Columns("Reviewed")
With ReviewColumn
.ThreeState = False
''etc
End With老实说,那时我甚至不会使用With块。
https://stackoverflow.com/questions/11566088
复制相似问题