Decimal.MaxValue フィールド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
Decimalの可能な最大値を表します。 このフィールドは定数であり、読み取り専用です。
public: static initonly System::Decimal MaxValue;
public static readonly decimal MaxValue;
staticval mutable MaxValue : decimal
Public Shared ReadOnly MaxValue As Decimal
フィールド値
例
次のコード サンプルは、 MaxValue の使用方法を示しています。
class PiggyBank {
public decimal Capacity {
get {
return Decimal.MaxValue;
}
}
protected decimal MyFortune;
public void AddPenny() {
MyFortune += .01m;
}
}
type PiggyBank() =
let mutable myFortune = 0m
member _.Capacity =
Decimal.MaxValue
member _.AddPenny() =
myFortune <- myFortune + 0.01m
Class PiggyBank
Public ReadOnly Property Capacity() As Decimal
Get
Return [Decimal].MaxValue
End Get
End Property
Protected MyFortune As Decimal
Public Sub AddPenny()
MyFortune += 0.01D
End Sub
End Class
注釈
この定数の値は正の 79,228,162,514,264,337,593,543,950,335 です。