Cannot implicitly convert type 'string' to 'double' Issue

前端 未结 5 1459
别那么骄傲
别那么骄傲 2020-12-20 10:17
    private void updateButton_Click(object sender, EventArgs e)
    {
        //custID.Text = customers[id].ID.ToString();
        customers[id].Name = custName.Text         


        
5条回答
  •  我在风中等你
    2020-12-20 10:18

    You should use Double.TryParse() to convert your string to a Double.You cannot save a string on a Double Datatype and there is no implicit conversion available in c# to do that

    Double result;
    Double.TryParse(custBal.Text,out result);
    

提交回复
热议问题