Problem with implicit conversion of double to float
Posted on 2006-10-21
I have some C# code that is using doubles for coordinate values that are passed to graphics functions such as:
DrawLine (Pen, x1,y1,x2,y2)
where x1, etc are all declared as double, while the methood is defined as
public void DrawLine (
I haven't been able to get this to compile, as I get an error:
Error 2 Argument '1': cannot convert from 'double' to 'float'
I assume this a problem with either the compiler options (to allow the implicit narrowing) or the library (is there are "double" version of System.Drawing.Graphics?
(Using Visual Studio C# 2005 Express compiler)