如何在不使用“委托”的情况下更改此代码? [英] How can I change this piece of code without using 'delegate'?
本文介绍了如何在不使用“委托”的情况下更改此代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
tempCountry = settingList.Find(
delegate(Veri veri)
{
return country.veri == veriCode;
}
);
tempCountry = settingList.Find(
delegate(Veri veri)
{
return country.veri == veriCode;
}
);
推荐答案
如果没有损坏,请不要破坏它。
我可以说,不要使用Linq,或尝试使用XPath,但实际上,如果它有效,请保持原样。
你为什么如此渴望改变它?
If it ain't broke, don't break it.
I could say, "Don't use Linq", or "Try using XPath", but really, if it works, leave it the way it is.
Why are you so eager to change it?
这篇关于如何在不使用“委托”的情况下更改此代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文