Link to home
Start Free TrialLog in
Avatar of Peter Kiers
Peter KiersFlag for Netherlands

asked on

Error in a methode

Hi,

I have this:

        private void edtVal1_CustomDisplayText_1(object sender, DevExpress.XtraEditors.Controls.CustomDisplayTextEventArgs e)
        {
            if (Properties.Settings.Default.IsMGDL)
            {
                edtVal1.Properties.Mask.EditMask = "d";
                edtVal1.Properties.DisplayFormat.FormatType = FormatType.Numeric;
                edtVal1.Properties.DisplayFormat.FormatString = "d";
                edtVal1.Properties.EditFormat.FormatType = FormatType.Numeric;
                edtVal1.Properties.EditFormat.FormatString = "d";
                edtVal1.Properties.MinValue = 70;
                edtVal1.Properties.MaxValue = 140;
                edtUnit1.EditValue = "mg/dl";
            }
            else
            {
                edtVal1.Properties.Mask.EditMask = "n1";
                edtVal1.Properties.DisplayFormat.FormatType = FormatType.Numeric;
                edtVal1.Properties.DisplayFormat.FormatString = "n1";
                edtVal1.Properties.EditFormat.FormatType = FormatType.Numeric;
                edtVal1.Properties.EditFormat.FormatString = "n1";
                 edtVal1.Properties.MinValue = 1.0; <==================
                   edtVal1.Properties.MaxValue = 35.0; <=====================
                edtUnit1.EditValue = "mmol/l";
            }
        }

Open in new window


I get an error at the 2 lines that I have marked with an arrow.

"Literal of type double cannot be implicitly converted to type 'decimal'; use an 'M' suffix to create a literal of this type"

What can I do about this to solve this?

Peter
SOLUTION
Avatar of Cluskitt
Cluskitt
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Meir Rivkin
Meir Rivkin
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Peter Kiers

ASKER

Thanks for the response.
It helped me alot.

Greetings,


Peter Kiers