Check out the MSDN documentation for XName.Get
:
expandedName
Type: System.String
A String that contains an expanded XML name in the format{namespace}localname
.
When you begin the string parameter with "{", it handles the name differently because it's expecting a namespace.
Here's the source for the method, via Reflector:
public static XName Get(string expandedName)
{
if (expandedName == null)
{
throw new ArgumentNullException("expandedName");
}
if (expandedName.Length == 0)
{
throw new ArgumentException(Res.GetString("Argument_InvalidExpandedName",
new object[] { expandedName }));
}
if (expandedName[0] != '{')
{
return XNamespace.None.GetName(expandedName);
}
int num = expandedName.LastIndexOf('}');
if ((num <= 1) || (num == (expandedName.Length - 1)))
{
throw new ArgumentException(Res.GetString("Argument_InvalidExpandedName",
new object[] { expandedName }));
}
return XNamespace.Get(expandedName, 1, num - 1).GetName(expandedName, num + 1,
(expandedName.Length - num) - 1);
}