Cast a Node to a Different Data Type Than Its Value's Original Data Type
using System; using System.Linq; using System.Xml.Linq; using System.Collections.Generic; class Program/*from w ww . j a v a2s . c om*/ { static void Main(string[] args){ XElement smoker = new XElement("Smoker", "true"); Console.WriteLine(smoker); Console.WriteLine((bool)smoker); } }