本文介绍了发送参数IEnumerable到方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的项目是Constants_Unit类
我在上课时创建了一个方法,
在该方法中,类型为IEnumerable t的一个参数为IEnumerable t.并返回IEnumerable< t>类型如何使用Constants_Unit类型调用此方法并分配返回值IEnumerable< t>对象类型Constants_Unit.
谢谢.
my project is class Constants_Unit
I created one metod in class ,
in this metod recive one parameter with type IEnumerable<t> and return type IEnumerable<t> how to calling this metod with Type Constants_Unit and assign return value IEnumerable<t> to object type Constants_Unit.
thanks you.
推荐答案
IEnumerable<Constants_Unit> myCollection = myMethod<Constants_Unit>();
这篇关于发送参数IEnumerable到方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!