[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 ?

Regards,
Marek

>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 :(
>
>???
>
>
>
>_______________________________________________
>Mono-devel-list mailing list
>Mono-devel-list at lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>  
>




More information about the Mono-devel-list mailing list