How can I do the following in C#? What is the right way to write the first line of this code snippet?
using KVP<K, V> = System.Collections.Generic.KeyValuePair<K, V>;
class C { KVP<int, string> x; }
How can I do the following in C#? What is the right way to write the first line of this code snippet?
using KVP<K, V> = System.Collections.Generic.KeyValuePair<K, V>;
class C { KVP<int, string> x; }
You can't, basically. You can only use fixed aliases, such as:
using Foo = System.Collections.Generic.KeyValuePair<int, string>;
class C { Foo x; }