private decimal? xposition;
public decimal? XPosition
{
get
{
return this.xposition;
}
set
{
this.xposition = value;
Math.Round(this.xposition, 4);
}
}
setメソッドでMath.round
を使用できないのはなぜですか?それは言う:setメソッドでMath.roundを使用できない理由#
引数 '#1'は '10進数'を変換できません。 double型を入力する式
適切なコードをインラインで貼り付けてください。 – Bathsheba
プライベート小数? xposition; –
プライベート小数? xposition; \t \t public decimal? XPosition \t \t { \t \t \t \t \t \t { \t \t \t \t戻りthis.xpositionを取得します。 \t \t \t} \t \t \t \t \t \t {\t \t \t \t \t \t \t \t this.xposition =値を設定します。 \t \t \t \t Math.Round(this.xposition、4); \t \t \t \t} \t \t \t \t} –