March 2014 update

This commit is contained in:
Ingy döt Net 2014-04-02 16:56:35 +00:00
parent 09687c4926
commit a25938f123
1846 changed files with 21876 additions and 5203 deletions

View file

@ -0,0 +1,58 @@
using System;
using System.Text;
using System.Xml;
namespace N
{
public class T
{
public static void Main()
{
var headerNames = new [] { "", "X", "Y", "Z" };
var headerColumns = headerNames.Select(name =>
new XElement
(
"th",
name,
new XAttribute("text-align", "center")
)
);
var rows = Enumerable.Range(0, 4)
.Select
(
rowIndex =>
new XElement
(
"tr",
new XElement("td", rowIndex),
Enumerable.Range(0, 4)
.Select
(
colIndex =>
new XElement
(
"td",
colIndex,
new XAttribute("text-align", "center")
)
)
)
);
var xml = new XElement
(
"table",
new XElement
(
"thead",
new XElement("tr", headerColumns),
new XElement("tbody", rows)
)
);
Console.WriteLine(xml.ToString());
}
}
}