Recently I discovered the 'using type alias' directive in C#, so I wrote the following code, just for fun.
namespace ConsoleApplication1
{
using Row = List<string>;
using Table = List<Row>;
using DataBase = Dictionary<string, Table>;
static class Program
{
public static void Main()
{
var d = new DataBase();
Console.Read();
}
}
}
but when I try to compile, I get 2 errors: The type or namespace name 'XXX' could not be found. replacing XXX by 'Row' and 'Table'.
Does anyone know why it and how to solve it? (without do
using Table = List<List<string>>;
)
>; using DataBase = Dictionary>>;. it also compile. the trouble is the cascading (using another alias in the definition of an alias).. that sould let the code much clear