悬赏园豆:20
[已解决问题]
解决于 2007-12-28 21:37
<P>C#代码如下:<BR> public interface IConfigInfo<BR> {<BR> }<BR> public class A : IConfigInfo<BR> {</P>
<P> }<BR> public class b<BR> {<BR> void bb(IConfigInfo a)<BR> {<BR> <FONT color=#ff0000><STRONG>Type t = a.GetType();</STRONG></FONT><BR> }<BR> }</P>
<DIV>VB.net代码如下:<BR>Public Interface IConfigInfo <BR>End Interface <BR>Public Class A <BR> Implements IConfigInfo <BR> <BR>End Class <BR>Public Class b <BR> Private Sub bb(ByVal a As IConfigInfo) <BR> <STRONG><FONT color=#ff0000>Dim t As Type = a.GetType()</FONT></STRONG> <BR> End Sub <BR>End Class </DIV>
<DIV>请大家注意红色部分,其中C#代码运行正常,而vb的哪个就是不行,错误原因为:</DIV>
<DIV><STRONG><FONT color=#ff0000>a.GetType()</FONT></STRONG> 提示:GetType不是IConfigInfo 的成员,求助大家解决办法</DIV>
没剑
|
菜鸟二级
|
园豆:
430
提问于:2007-12-27 16:14