ie something like
typedef Dictionary<string, string> mydict;
I swear I have seen it but cannot find it
ie something like
typedef Dictionary<string, string> mydict;
I swear I have seen it but cannot find it
using MyDict = Dictionary<String, String>
which is like defining a symbol which would be replaced by the compiler.
Sort of.
using IntList = System.Collections.Generic.List<int>;
http://arbel.net/2004/07/07/the-hidden-c-typedef/
One issue is there is no way to #include the definition.
use inheritance:
public class DoubleNameValueCollection : Dictionary< string, NameValueCollection > { }
Then use as if it were a typedef:
NameValueCollection values = new NameValueCollection();
values.Add( "value1", "value2" );
DoubleNameValueCollection dblNameCol = new DoubleNameValueCollection();
dblNameCol.Add( "key1", values );
Or if you want to confuse others:
DoubleNameValueCollection dblNameCol = new DoubleNameValueCollection
{
{ "key1", new NameValueCollection
{
{ "value1", "value2" }
}}};
There is delegate, which is used for defining a type of method argument,
there is using BlaBla = Full.Name.Space.Yada.Yada;
however, the using statement is only valid in current file.