> I got a compiler error telling that I cannot convert a struct to an
> interface through casting. The struct actually implements the
> interface
> and I try to cast it directly (although the 'as' way doesn't work
> neither):
>
> ISomeInterface isObject = (ISomeInterface) isObject;
>
This is surely a bug in the Compiler. The interface implementation
information is not written to the output file for structs.
For example,
public struct Mystruct: IMyInterface
{
}
public interface IMyInterface
{
}
The monodis of output file has
.class public sequential ansi sealed beforefieldinit Mystruct
extends [mscorlib]System.ValueType
whereas it should also have
implements IMyInterface
Please file a bug report.
Cheers,
Ajay
_______________________________________________
Mono-list maillist - [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list