在RuleSetDialog中使用泛型方法和typeof [英] Using generic methods and typeof in RuleSetDialog
问题描述
我正在尝试在我的rulesetdialog中进行泛型方法调用:
double
Deduction< T>() 其中
T:接口。 IDeductionLogic
{
返回
Deductions.OfType< T>()。Sum(d => d.Deduction());
}
但是,对包含该方法的类使用 RuleSetDialog时,函数没有显示。
我知道这个问题之前曾在2006年10月讨论过,但我想知道是否有任何进展。
-josh
Joshua
- >"但是,当对包含该方法的类使用RuleSetDialog,该函数不显示。"
我厌倦了一些其他接口,例如IComparable。该方法确实在我的RuleSetDialog中显示。
你在哪里放置你的接口?你能用普通的c#测试文件访问接口。
此致
Hi,
I am trying to make a generic method call in my rulesetdialog:
double Deduction<T>() where T : Interfaces.IDeductionLogic
{
return Deductions.OfType<T>().Sum(d => d.Deduction());
}
But, when using the RuleSetDialog against the class that contains that method, that function does not show.
I know this issue was previously discussed back in 10/2006, but I am wondering if any progress has been made.
-josh
Hi, Joshua
->"But, when using the RuleSetDialog against the class that contains that method, that function does not show."
I tired some other interfaces, such as IComparable. the method indeed shows in my RuleSetDialog.
Where do you place your Interfaces? Could you access to the Interfaces in a plain c# test file.
Regards
这篇关于在RuleSetDialog中使用泛型方法和typeof的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!