> I agree....its more of an experiment at the moment.....and > they are interfaces....just parametised ones.
Generic interfaces? Isn't that mitigating the aspect of interfaces? I mean: if you have an instance of Class<T>, and pass that to some code and inside that code you don't know the type of T (this can happen), you can refer to the instance of Class<T> with the interface, so your code will become very simple. If you have generic interfaces as well, the problem remains and you have to at some point need to know the type of T to get things compiled. This especially creates problems when T has to be of some type, so where clauses have to be added to the method. With an interface you can solve this problem. so I always use the rule of thumb: use interfaces to use generic classes in code where you don't know the generic parameter type, and thus keep your interfaces non-generic just for this purpose. FB > > -----Original Message----- > From: Discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED] On Behalf Of Frans Bouma > Sent: 17 October 2006 13:17 > To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM > Subject: Re: [ADVANCED-DOTNET] Type declarations in ide.... > > > A slightly bizarre question.... > > > > I've got some generic methods that return generic types, > the problem > > is that sometimes the types get very large...e.h. > > > > > > Foo<Foo<Bar<Foo<Bar>,Foo<Foo>>>> x = > > a.GetFoo<Foo<Bar<Foo<Bar>,Foo<Foo>>>> > > (b); > > > > is there a way of getting the IDE to auto generate the type > > declaration, so I don't spend hours foo'ing and bar'ing. > > I'm not sure if you should continue with this. It > makes code VERY unreadable. Too much of a good is still 'too much' ;) > > You might want to use an interface here and there. > > Frans > > =================================== > This list is hosted by DevelopMentor(r) http://www.develop.com > > View archives and manage your subscription(s) at > http://discuss.develop.com > > > ************************************************************** > ************* > CONFIDENTIALITY NOTICE > > The contents of this e-mail are confidential to the ordinary > user of the e-mail address to which it was addressed, and may > also be privileged. If you are not the addressee of this > e-mail you may not copy, forward, disclose or otherwise use > it or any part of it in any form whatsoever.If you have > received this e-mail in error, please e-mail the sender by > replying to this message. > > It is your responsibility to carry out appropriate virus and > other checks to ensure that this message and any attachments > do not affect your systems / data. Any views or opinions > expressed in this e-mail are solely those of the author and > do not necessarily represent those of MTV Networks Europe > unless specifically stated, nor does this message form any > part of any contract unless so stated. > > MTV reserves the right to monitor e-mail communications from > external/internal sources for the purposes of ensuring > correct and appropriate use of MTV communication equipment. > > MTV Networks Europe > ************************************************************** > ************* > > > =================================== > This list is hosted by DevelopMentorR http://www.develop.com > > View archives and manage your subscription(s) at > http://discuss.develop.com > =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com