type circle = { X : int; Y : int; Diameter : int; Color : Color}
let mutable clickedCircle = { X = 0; Y = 0; Diameter = 0; Color = Color.White}
let txtBoxVal4 = System.Enum.Parse(typeof<Color>,txtBox2.Text)
clickedCircle <- {X = txtBoxVal2; Y = txtBoxVal3; Diameter = txtBoxVal1; Color = txtBoxVal4}
Я пытаюсь разобрать textbox.text в цвет. Из этого кода я получаю сообщение об ошибке:f # разбор строки для цвета
Error 1 This expression was expected to have type
Color
but here has type
obj
Совершенно новый для F # и не уверен в синтаксисе. Ошибка приходит в
"Color = txtBoxVal4"