[Mono-devel-list] float/double in attributes ??

Marek Safar marek.safar at seznam.cz
Mon Feb 14 08:26:31 EST 2005

Hello Pascal,

I found bug in processing of double types as attribute arguments. 
However, I am not sure whether it is exactly your case.
Could you send me code snippet of your attribute usage ?


>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 :
>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
>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 :(
>Mono-devel-list mailing list
>Mono-devel-list at lists.ximian.com

More information about the Mono-devel-list mailing list