Re: Generics without direct instantiation
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Sat, 3 Mar 2007 14:42:08 -0000
Mark Rae <mark@xxxxxxxxxxxxxxxxx> wrote:
This is just for my own interest - I don't actually want to do it, I'm just
curious to know if it's possible...
<snip>
Could we also do something like MyMethod(new Dictionary<string,
string>(...................);
I'm not sure exactly what you're asking. You could certainly call
MyMethod(new Dictionary<string,string>());
or use any of the other constructors of Dictionary<K,V> - but there
aren't any constructors which take an IEnumerable in the same way that
List<T> does.
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.
- Follow-Ups:
- Re: Generics without direct instantiation
- From: Mark Rae
- Re: Generics without direct instantiation
- References:
- Generics without direct instantiation
- From: Mark Rae
- Generics without direct instantiation
- Prev by Date: Copy/Paste in menu
- Next by Date: Alternative to global variables in c++: Newbie
- Previous by thread: Generics without direct instantiation
- Next by thread: Re: Generics without direct instantiation
- Index(es):
Relevant Pages
|