“interface”接口声明变量的话,不可以声明“委托类型”的变量吗????
是这样吗??? 为什么呢???
Science and technology is my lover.
Hi,
不光委托,一切字段都不可以在接口中定义。接口只能定义方法。可以定义属性, 因为属性本质上是get/set方法。
.property instance string Name() { .get instance string IMyInterface::get_Name() .set instance void IMyInterface::set_Name(string) } // end of property IMyInterface::Name
请给出你的代码,我没有理解你的意思,谢谢!
下载MSDN桌面工具(Vista,Win7) 我的博客园 慈善点击,点击此处