我有这个功能从插件(从以前的文章)介绍到的λ/匿名函数
// This method implements the test condition for
// finding the ResolutionInfo.
private static bool IsResolutionInfo(ImageResource res)
{
return res.ID == (int)ResourceIDs.ResolutionInfo;
}
而行,多数民众赞成在调用这个函数:
get
{
return (ResolutionInfo)m_imageResources.Find(IsResolutionInfo);
}
所以基本上我想摆脱通话功能。它只被调用两次(一次在get中,另一次在set中)。它可以帮助我了解c#中的内联函数。
三江源,但如果我这样做行不行: (ImageResource X)=> x.ID ==(INT)ResourceIDs.ResolutionInfo 即增加一个类型为 “X” – masfenix 2009-01-06 02:33:12