Decimal.Zero フィールドとは? わかりやすく解説

Decimal.Zero フィールド

数値 0 を表します

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

使用例使用例

Zero フィールド使用方法については、次のコード例参照してください

' Example of the Decimal fields.
Imports System
Imports Microsoft.VisualBasic

Module DecimalFieldsDemo
    
    Sub Main( )

        Const numberFmt As String
 = "{0,-25}{1,45:N0}"
        Const exprFmt As String
 = "{0,-55}{1,15}"

        Console.WriteLine( _
            "This example of the fields of the Decimal structure"
 & _
            vbCrLf & "generates the following output."
 & vbCrLf )
        Console.WriteLine( numberFmt, "Field or Expression",
 "Value" )
        Console.WriteLine( numberFmt, "-------------------",
 "-----" )

        ' Display the values of the Decimal fields.
        Console.WriteLine( numberFmt, "Decimal.MaxValue",
 _
            Decimal.MaxValue )
        Console.WriteLine( numberFmt, "Decimal.MinValue",
 _
            Decimal.MinValue )
        Console.WriteLine( numberFmt, "Decimal.MinusOne",
 _
            Decimal.MinusOne )
        Console.WriteLine( numberFmt, "Decimal.One",
 _
            Decimal.One )
        Console.WriteLine( numberFmt, "Decimal.Zero",
 _
            Decimal.Zero )
        Console.WriteLine( )

        ' Display the values of expressions of the Decimal fields.
        Console.WriteLine( exprFmt, _
            "( Decimal.MinusOne + Decimal.One ) = Decimal.Zero",
 _
            ( Decimal.MinusOne + Decimal.One
 ) = Decimal.Zero )
        Console.WriteLine( exprFmt, _
            "Decimal.MaxValue + Decimal.MinValue",
 _
            Decimal.MaxValue + Decimal.MinValue
 )
        Console.WriteLine( exprFmt, _
            "Decimal.MinValue / Decimal.MaxValue",
 _
            Decimal.MinValue/Decimal.MaxValue )
        Console.WriteLine( "{0,-40}{1,30}", _
            "100000000000000D / Decimal.MaxValue",
 _
            100000000000000D / Decimal.MaxValue )
    End Sub 
End Module 

' This example of the fields of the Decimal structure
' generates the following output.
' 
' Field or Expression                                              Value
' -------------------                                              -----
' Decimal.MaxValue                79,228,162,514,264,337,593,543,950
,335
' Decimal.MinValue               -79,228,162,514,264,337,593,543,950
,335
' Decimal.MinusOne                                                 
   -1
' Decimal.One                                                      
    1
' Decimal.Zero                                                     
    0
' 
' ( Decimal.MinusOne + Decimal.One ) = Decimal.Zero                
 True
' Decimal.MaxValue + Decimal.MinValue                              
    0
' Decimal.MinValue / Decimal.MaxValue                              
   -1
' 100000000000000D / Decimal.MaxValue     0.0000000000000012621774483536
// Example of the Decimal fields.
using System;

class DecimalFieldsDemo
{
    public static void Main(
 )
    {
        const string numberFmt = "{0,-25}{1
,45:N0}";
        const string exprFmt = "{0,-55}{1
,15}";

        Console.WriteLine( 
            "This example of the fields of the Decimal structure " +
            "\ngenerates the following output.\n" );
        Console.WriteLine( numberFmt, "Field or Expression", "Value"
 );
        Console.WriteLine( numberFmt, "-------------------", "-----"
 );

        // Display the values of the Decimal fields.
        Console.WriteLine( numberFmt, "Decimal.MaxValue", 
            Decimal.MaxValue );
        Console.WriteLine( numberFmt, "Decimal.MinValue", 
            Decimal.MinValue );
        Console.WriteLine( numberFmt, "Decimal.MinusOne", 
            Decimal.MinusOne );
        Console.WriteLine( numberFmt, "Decimal.One", Decimal.One );
        Console.WriteLine( numberFmt, "Decimal.Zero", Decimal.Zero );
        Console.WriteLine( );

        // Display the values of expressions of the Decimal fields.
        Console.WriteLine( exprFmt, 
            "( Decimal.MinusOne + Decimal.One ) == Decimal.Zero", 
            (Decimal.MinusOne + Decimal.One ) == Decimal.Zero );
        Console.WriteLine( exprFmt, 
            "Decimal.MaxValue + Decimal.MinValue", 
            Decimal.MaxValue + Decimal.MinValue );
        Console.WriteLine( exprFmt, 
            "Decimal.MinValue / Decimal.MaxValue", 
            Decimal.MinValue / Decimal.MaxValue );
        Console.WriteLine( "{0,-40}{1,30}", 
            "100000000000000M / Decimal.MaxValue", 
            100000000000000M / Decimal.MaxValue );
    }
}

/*
This example of the fields of the Decimal structure
generates the following output.

Field or Expression                                              Value
-------------------                                              -----
Decimal.MaxValue                79,228,162,514,264,337,593,543,950,335
Decimal.MinValue               -79,228,162,514,264,337,593,543,950,335
Decimal.MinusOne                                                    -1
Decimal.One                                                          1
Decimal.Zero                                                         0

( Decimal.MinusOne + Decimal.One ) == Decimal.Zero                True
Decimal.MaxValue + Decimal.MinValue                                  0
Decimal.MinValue / Decimal.MaxValue                                 -1
100000000000000M / Decimal.MaxValue     0.0000000000000012621774483536
*/
// Example of the Decimal fields.
using namespace System;
int main()
{
   String^ numberFmt = "{0,-25}{1,45:N0}";
   String^ exprFmt = "{0,-55}{1,15}";
   Console::WriteLine( "This example of the fields of the Decimal structure
 "
   "\ngenerates the following output.\n" );
   Console::WriteLine( numberFmt, "Field or Expression", "Value"
 );
   Console::WriteLine( numberFmt, "-------------------", "-----"
 );
   
   // Display the values of the Decimal fields.
   Console::WriteLine( numberFmt, "Decimal::MaxValue", Decimal::MaxValue
 );
   Console::WriteLine( numberFmt, "Decimal::MinValue", Decimal::MinValue
 );
   Console::WriteLine( numberFmt, "Decimal::MinusOne", Decimal::MinusOne
 );
   Console::WriteLine( numberFmt, "Decimal::One", Decimal::One );
   Console::WriteLine( numberFmt, "Decimal::Zero", Decimal::Zero );
   Console::WriteLine();
   
   // Display the values of expressions of the Decimal fields.
   Console::WriteLine( exprFmt, "( Decimal::MinusOne + Decimal::One ) == Decimal::Zero",
 (Decimal::MinusOne + Decimal::One) == Decimal::Zero );
   Console::WriteLine( exprFmt, "Decimal::MaxValue + Decimal::MinValue",
 Decimal::MaxValue + Decimal::MinValue );
   Console::WriteLine( exprFmt, "Decimal::MinValue / Decimal::MaxValue",
 Decimal::MinValue / Decimal::MaxValue );
   Console::WriteLine( "{0,-40}{1,30}", "100000000000000M / Decimal::MaxValue",
 Convert::ToDecimal( 100000000000000 ) / Decimal::MaxValue );
}

/*
This example of the fields of the Decimal structure
generates the following output.

Field or Expression                                              Value
-------------------                                              -----
Decimal::MaxValue               79,228,162,514,264,337,593,543,950,335
Decimal::MinValue              -79,228,162,514,264,337,593,543,950,335
Decimal::MinusOne                                                   -1
Decimal::One                                                         1
Decimal::Zero                                                        0

( Decimal::MinusOne + Decimal::One ) == Decimal::Zero             True
Decimal::MaxValue + Decimal::MinValue                                0
Decimal::MinValue / Decimal::MaxValue                               -1
100000000000000M / Decimal::MaxValue    0.0000000000000012621774483536
*/
// Example of the Decimal fields.
import System.* ;

class DecimalFieldsDemo
{
    public static void main(String[]
 args)
    {
        final System.String numberFmt = "{0,-25}{1,45:N0}";
        final System.String exprFmt = "{0,-55}{1,15}";

        Console.WriteLine(("This example of the fields of the Decimal "
 
            + "structure \ngenerates the following output.\n"));
        Console.WriteLine(numberFmt, "Field or Expression", "Value");
        Console.WriteLine(numberFmt, "-------------------", "-----");

        // Display the values of the Decimal fields.
        Console.WriteLine(numberFmt, "Decimal.MaxValue", Decimal.MaxValue);
        Console.WriteLine(numberFmt, "Decimal.MinValue", Decimal.MinValue);
        Console.WriteLine(numberFmt, "Decimal.MinusOne", Decimal.MinusOne);
        Console.WriteLine(numberFmt, "Decimal.One", Decimal.One);
        Console.WriteLine(numberFmt, "Decimal.Zero", Decimal.Zero);
        Console.WriteLine();

        // Display the values of expressions of the Decimal fields.
        Console.WriteLine(exprFmt,
            "( Decimal.MinusOne ,Decimal.One ) == Decimal.Zero ",
            System.Convert.ToString(System.Decimal.Add(Decimal.MinusOne,
            Decimal.One) == Decimal.Zero));
        Console.WriteLine(exprFmt, "Decimal.MaxValue + Decimal.MinValue"
,
            System.Decimal.Add(Decimal.MaxValue, Decimal.MinValue));
        Console.WriteLine(exprFmt, "Decimal.MinValue / Decimal.MaxValue"
,
            System.Decimal.Divide(Decimal.MinValue, Decimal.MaxValue));
        Console.WriteLine("{0,-40}{1,30}","100000000000000M / Decimal.MaxValue"
,
            System.Decimal.Divide(System.Convert.ToDecimal(100000000000000L),
            Decimal.MaxValue));
    } //main
} //DecimalFieldsDemo

/*
This example of the fields of the Decimal structure
generates the following output.

Field or Expression                                              Value
-------------------                                              -----
Decimal.MaxValue                79,228,162,514,264,337,593,543,950,335
Decimal.MinValue               -79,228,162,514,264,337,593,543,950,335
Decimal.MinusOne                                                    -1
Decimal.One                                                          1
Decimal.Zero                                                         0

( Decimal.MinusOne + Decimal.One ) == Decimal.Zero                True
Decimal.MaxValue + Decimal.MinValue                                  0
Decimal.MinValue / Decimal.MaxValue                                 -1
100000000000000M / Decimal.MaxValue     0.0000000000000012621774483536
*/
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「Decimal.Zero フィールド」の関連用語

Decimal.Zero フィールドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Decimal.Zero フィールドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS