1
可能重複:
How to access the object itself in With … End With有沒有辦法引用我正在使用的項目「With」?
想我會喜歡做這樣的事情:
With grid.Columns("Reviewed")
CType(<the with object>, DataGridViewCheckBoxColumn).ThreeState = False
...
End With
基本上,我想在下面的等價以上聲明:
CType(grid.Columns("Reviewed"), DataGridViewCheckBoxColumn).ThreeState = False
是否有一些關鍵字可以用來指示我是「WITH」的對象?
看看這篇文章 http://stackoverflow.com/questions/1152983/how-to-access-the-object-itself-in-with-end-with – PaShKa 2012-07-19 17:36:39