实际上我不知道它们是否应该工作。
我用C#制作了一个库,有人告诉我我的其中一种方法在VB.NET中作为扩展无法使用。 http://valueinjecter.codeplex.com/Thread/View.aspx?ThreadId=227498
这是这个方法:
public static PropertyDescriptorCollection GetProps(this object o)
{
return GetProps(o.GetType());
}
实际上我不知道它们是否应该工作。
我用C#制作了一个库,有人告诉我我的其中一种方法在VB.NET中作为扩展无法使用。 http://valueinjecter.codeplex.com/Thread/View.aspx?ThreadId=227498
这是这个方法:
public static PropertyDescriptorCollection GetProps(this object o)
{
return GetProps(o.GetType());
}
Dim local As Object = ...
local.GetProps() ' This is a late bound call
GetProps
的解释。这是一个非常可怕的前景。 - JaredParGetProps
解析为扩展方法,并仅将其传递给运行时绑定器作为回退。虽然在运行时动态解析扩展方法可能很好(或者很可怕),但似乎并不需要获得OP所期望的行为。 - GabePropertyDescriptorCollection.GetProps(x)
。 - H H