LINQ XML C# Book

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
class Program
{
static void Main()
{
XElement items = XElement.Parse("");
items.FirstNode.ReplaceWith(new XComment("One was here"));
Console.WriteLine(items);
}
}

The output: