summaryrefslogtreecommitdiff
path: root/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs')
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
index 70b6430929..81dea5e4a4 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
@@ -382,7 +382,8 @@ namespace System.Xml.Linq
public XAttribute Attribute (XName name)
{
- foreach (XAttribute a in Attributes ())
+ XAttribute next;
+ for (XAttribute a = attr_first; a != null; a = a.NextAttribute)
if (a.Name == name)
return a;
return null;