[Mono-devel-list] float/double in attributes ??
Pascal Fresnay
pascalfresnay at free.fr
Wed Feb 9 16:20:10 EST 2005
Hi,
I got a warning like that when marking a property with a custom
attribute :
CS8023: The compiler can not encode this attribute in .NET due to a bug
in the .NET runtime. Try the Mono runtime. The exception was: Value of
argument 0 does not match parameter type
code snippet :
[AttributeUsage(AttributeTargets.Property)]
public sealed class BoundAttribute : System.Attribute
{
private double min;
private double max;
public BoundAttribute(double min, double max)
{
this.min = min;
this.max = max;
}
//...
}
using latest mono from CVS, on Linux.
Can you explain me what does it mean exactly ?
It compile and work fine on Windows with MS compiler and MS .NET
runtime.
It's just a warning but I get default values (0,0) at runtime.
Problem doesn't occur with Integer types.
I was unable to reproduce this issue in a small test code, only in a big
apps :(
???
More information about the Mono-devel-list
mailing list