Google Groups Home
Help | Sign in
Message from discussion Overloading in generic interfaces
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Christof Nordiek  
View profile
 More options May 30 2007, 7:27 am
Newsgroups: microsoft.public.dotnet.languages.csharp
From: "Christof Nordiek" <c...@nospam.de>
Date: Wed, 30 May 2007 13:27:53 +0200
Local: Wed, May 30 2007 7:27 am
Subject: Re: Overloading in generic interfaces
"Marc Gravell" <marc.grav...@gmail.com> schrieb im Newsbeitrag
news:1180520629.679372.198320@m36g2000hse.googlegroups.com...

>> Not so; try this:

> ref ECMA 334, 3rd edtion; 14.4.2.2 Better function member

> "If one of MP and MQ is non-generic, but the other is generic, then
> the non-generic is better."

Actually, your conclusion is right. But it's the wrong rule.
A generic member is a member that has itself type parameters, not a method
that has a type parameter as a type of its parameters.

Applicable is the rule of more specific parameter types:

"Otherwise, .... if one method has more specific parameter types, then that
method is better. .....
A type parameter is less specific than a non-type parameter. ...."

Christof


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google