Simple Use IEnumerable<T>
Private static IEnumerable<T> FunDemo(T para)
{
while(...)
{
....
yield return Obj;
}
}
static main(arg[] arg)
{
IEnumerable<T> list=FunDemo(para);
foreach(var m in list)
{
Console.WriteLine("The No. "+IndexOf(m));
do{
Console.WriteLine(....);
}while(...)
}
}
Thanks & Best Regards!
Javi Zhu 朱佳辉
Mobile: 15900467108
Email: Javi.zhu@outlook.com