J
Jasper Kent
I'm trying to do the equivalent of using typedefs with templates in C++ to
avoid long instantiation names.
I can do this okay:
using BigDictionary = System.Collections.Generic.Dictionary<int,
System.Collections.Generic.Dictionary<int, string>>;
class MyClass
{
private BigDictionary myDictionary;
}
But I think it would be tidier to break it down, something like:
using InnerDictionary = System.Collections.Generic.Dictionary<int, string>;
using BigDictionary =
System.Collections.Generic.Dictionary<int,InnerDictionary>;
class MyClass
{
private BigDictionary myDictionary;
}
However, InnerDictionary is not recognised in the declaration of
BigDictionary. Is there any way I can do this?
In practice, the types I am using are fully scoped, rather than being
fundamental types, so the whole thing is even more verbose.
Thank is advance.
avoid long instantiation names.
I can do this okay:
using BigDictionary = System.Collections.Generic.Dictionary<int,
System.Collections.Generic.Dictionary<int, string>>;
class MyClass
{
private BigDictionary myDictionary;
}
But I think it would be tidier to break it down, something like:
using InnerDictionary = System.Collections.Generic.Dictionary<int, string>;
using BigDictionary =
System.Collections.Generic.Dictionary<int,InnerDictionary>;
class MyClass
{
private BigDictionary myDictionary;
}
However, InnerDictionary is not recognised in the declaration of
BigDictionary. Is there any way I can do this?
In practice, the types I am using are fully scoped, rather than being
fundamental types, so the whole thing is even more verbose.
Thank is advance.