私はクラス内でメンバー関数を作成しました。その後、このメンバ関数の結果に設定されたメンバ値を作成したいと思います。F#メンバー関数に基づいてメンバー値を作成
type MyType() =
member this.drawFilledPlanet(xCoord:int, yCoord:int, pWidth:int, pHeight:int, color) =
let brush = new System.Drawing.SolidBrush(color)
this.window.Paint.Add(fun e ->
e.Graphics.FillEllipse(brush, xCoord, yCoord, pWidth, pHeight))
member val theSun = drawFilledPlanet(350,350,100,100, this.yellow)
drawFilledPlanet
が定義されていないというエラーが表示されます。
誰かが私に何かを教えてもらえますか?
'drawFilledPlanet'の前に' this.'がありません。 –
それはそれではありません – Nulle
はい、それは..... –