I have a class to handle config files and I want to tidy up the code to make it more readable and maintainable. In C++ I would usually do this using typedefs but I found that there is a way to do this in C# by using the 'using' keyword (see Equivalent of typedef in C#). My only problem is that there doesn't seem to be a way to nest these. Here is what I want to achieve:
using ConfigValue = System.Collections.Generic.List< System.String >;
using ConfigKey = System.String;
using ConfigSection = System.Collections.Generic.Dictionary< ConfigKey, ConfigValue >;
How can I achieve this without making ConfigSection explicit just in case I change the type of the ConfigKey or ConfigValue and forget to change the ConfigSection?
Thanks
Allan