作者godman362 (Shizuru)
看板C_Sharp
標題[問題] this用ref傳
時間Sun Apr 19 09:49:32 2009
請問一下,可以將this用ref傳給thread嗎
因為是要傳雙層的thread
狀況如下:
Form---|
|
|---Thread A---|
|
|---Thread B
就是我在Thread A又呼叫一個Thread B
但是我的this是要傳給Thread B使用
可是只能透過Thread A傳給B
所以想請問,除了用ref,還有沒有其他的作法?
因為我用ref修飾時,發現this是唯讀,不允許用ref傳
還煩請各位給予指點
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 203.74.245.163
1F:推 deuter:如果把thread的函式寫在Form class裡 就不用傳this了 04/19 11:27
2F:→ godman362:喔,對欸,謝謝提醒 04/19 15:57