Remoting throws an ambiguous match exception when calling a method on a
remote MBR object that differs from another method of the type only by
the return type. Here's an example using pseudo-C# syntax:

  internal class AppDomainInfoFetcher : System.MarshalByRefObject {
    internal AppDomainInfo a (AssemblyName name) { . . . }
    internal AssemblyName[] a (AssemblyName name) { . . . }
    }
  }

Partition I 7.5.2       Assemblies and Scoping
Generally, names are not unique. Names are collected into groupings
called scopes. Within a scope, a name may refer to multiple entities as
long as they are of different kinds (methods, fields, nested types,
properties, and events) or have different signatures. 

[Brent] The two methods called 'a' above have differing signatures. Only
CLS Rule 6 requires the return type part of a signature to be ignored.
But Remoting should work for non-CLS compliant types too.

CLS Rule 6: Fields and nested types shall be distinct by identifier
comparison alone, even though the CTS allows distinct signatures to be
distinguished.  Methods, properties, and events that have the same name
(by identifier comparison) shall differ by more than just the return
type, except as specified in CLS Rule 39.


-- Brent Rector, .NET Wise Owl
Demeanor for .NET - an obfuscation utility
http://www.wiseowl.com/Products/Products.aspx

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to