在RuleSetDialog中使用泛型方法和typeof [英] Using generic methods and typeof in RuleSetDialog

查看:65
本文介绍了在RuleSetDialog中使用泛型方法和typeof的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在尝试在我的rulesetdialog中进行泛型方法调用:


double
Deduction< T>()
其中
T:接口。
IDeductionLogic



{



  返回
Deductions.OfType< T>()。Sum(d => d.Deduction());


}


但是,对包含该方法的类使用  RuleSetDialog时,函数没有显示。


我知道这个问题之前曾在2006年10月讨论过,但我想知道是否有任何进展。


 

http://social.msdn.microsoft.com/Forums/en-US/windowsworkflowfoundation/thread/82978e24-a0f4-4ab0-bdd4-4f9ca104f8b7


 


 


-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.

 

http://social.msdn.microsoft.com/Forums/en-US/windowsworkflowfoundation/thread/82978e24-a0f4-4ab0-bdd4-4f9ca104f8b7

 

 

-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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆