Avatar of Peter Kiers
Peter Kiers
Flag 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
.NET Programming

Avatar of undefined
Last Comment
Peter Kiers

8/22/2022 - Mon
SOLUTION
Cluskitt

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Meir Rivkin

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Peter Kiers

ASKER
Thanks for the response.
It helped me alot.

Greetings,


Peter Kiers
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy