SoapYearMonth.Sign 属性

定义

获取或设置当前实例的日期和时间是正还是负。

public:
 property int Sign { int get(); void set(int value); };
public int Sign { get; set; }
member this.Sign : int with get, set
Public Property Sign As Integer

属性值

一个整数,指示 Value 是正还是负。

示例

下面的代码示例演示如何使用此属性。 此代码示例是为 SoapYearMonth 类提供的一个更大示例的一部分。

// Display the sign of the SoapYearMonth object.
Console::WriteLine( "The sign of the SoapYearMonth instance is {0}.",
   yearMonth->Sign );
// Display the sign of the SoapYearMonth object.
Console.WriteLine("The sign of the SoapYearMonth object is {0}.",
    yearMonth.Sign);

注解

小于 0 的整数表示负 Sign

适用于