[問題] check delegate

看板C_Sharp (C#)作者 (crystal)時間14年前 (2011/07/06 02:41), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串1/1
Hello programmers, I'm doing a project involving serializing a class that contains delegate type member. To be serilizable, the delegates must correspond to static methods. Anyone know how to check if your delegate member correspnds to a static method? Pseudo code: bool isStatic( yourDelegate member ) { if typeof( member) = static (or serializable) return truth else return false } Thanks! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 131.107.65.118

07/07 12:10, , 1F
use "Reflection"
07/07 12:10, 1F

07/07 14:51, , 2F
感謝樓上 多學到一種東西~~
07/07 14:51, 2F
文章代碼(AID): #1E4rh3VK (C_Sharp)
文章代碼(AID): #1E4rh3VK (C_Sharp)