(excel.Selection as Range).WriteTable(files, "myNewTable");
with this line: Write(files, "myNewTable");
The Write method is available globally (it's not a method that belongs to a class). This is a trick specific to C# scripts (would be illegal in regular C#).