Given this XML file:\[code\]<?xml version="1.0" encoding="utf-8"?><configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> </startup> <mySection> <NetworkShare folder="\\myFolder\v1" /> </mySection> </configuration>\[/code\]Following code does not work (gives blank output):\[code\]var navigator = XElement.Load(ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None).FilePath).CreateNavigator(); var q = navigator.Select("/configuration/mySection/NetworkShare"); if (q.Count == 1) // q.Count is 0 { q.MoveNext(); Console.WriteLine(q.Current.GetAttribute("folder", navigator.Prefix)); }\[/code\]But this code works (correctly prints out folder):\[code\]var navigator = XDocument.Load(ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None).FilePath).CreateNavigator(); var q = navigator.Select("/configuration/mySection/NetworkShare"); if (q.Count == 1) // q.Count is 1 { q.MoveNext(); Console.WriteLine(q.Current.GetAttribute("folder", navigator.Prefix)); }\[/code\]Is this a bug in .net?