Take the 2-minute tour ×  In Visual Studio Re-Sharper keeps
recommending I convert a for loop to a linq expression but what
is the reason for this?  Which is faster?  Here are some example
loops where resharper suggests a linq conversion:  foreach
(XmlNode legendEntryNode in _legendEntryNodes)     var
xmlElement = legendEntryNode["FeatureType"];      if (xmlElement
== null || !xmlElement.InnerText.Equals(featuretype)) continue;
var xmlNodeList = legendEntryNode.SelectNodes("Themes/Theme");
if (xmlNodeList != null)      foreach (XmlNode themeNode in
xmlNodeList)         var element = themeNode["Value"];
if (element == null || !element.InnerText.Equals(v)) continue;
var xmlElement1 = themeNode["Icon"];          if (xmlElement1 !=
null)             string iconname = "<ms:ICON>" +
xmlElement1.InnerText + "</ms:ICON>";              var element1
= themeNode["Highlight"];              if (element1 != null)
string highlightname = "<ms:HIGHLIGHT>" + element1.InnerText +
"</m