[Mono-list] Compilation Error regarding Constraints
Christian Gross
mailing at devspace.com
Wed May 25 17:11:23 EDT 2005
Consider the following source code:
interface IBase {
void Method< type>( type param);
}
class Implementation : IBase {
public void Method< paramtype>( paramtype param) {
}
}
If I compile this source code everything compiles fine in one assembly. If I move the interface IBase
into another assembly I get a compilation error, even though on Windows Beta 2 everything
compiles. The error that I get is:
The constraints for type parameter `paramtype' of method `Implementation.Method( paramtype)'
must match the constraints for type parameter `type' of interface method `IBase.Method(type)'.
Consider using an explicit interface implementation instead
Could somebody please tell me how come this does not compile?
Thanks
Christian Gross
--
"If you could say it in words there would be no reason to paint."
Edward Hopper
More information about the Mono-list
mailing list