SoapYearMonth Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the SoapYearMonth class.
Overloads
SoapYearMonth() |
Initializes a new instance of the SoapYearMonth class. |
SoapYearMonth(DateTime) |
Initializes a new instance of the SoapYearMonth class with a specified DateTime object. |
SoapYearMonth(DateTime, Int32) |
Initializes a new instance of the SoapYearMonth class with a specified DateTime object and an integer that indicates whether Value is a positive or negative value. |
SoapYearMonth()
Initializes a new instance of the SoapYearMonth class.
public:
SoapYearMonth();
public SoapYearMonth ();
Public Sub New ()
Examples
The following code example shows how to use this constructor.
// Create a SoapYearMonth object.
SoapYearMonth^ year = gcnew SoapYearMonth;
year->Value = DateTime::Now;
Console::WriteLine( "The year is {0}.", year );
// Create a SoapYearMonth object.
SoapYearMonth yearMonth = new SoapYearMonth();
yearMonth.Value = DateTime.Now;
Console.WriteLine("The yearMonth is {0}.", yearMonth.ToString());
Applies to
SoapYearMonth(DateTime)
Initializes a new instance of the SoapYearMonth class with a specified DateTime object.
public:
SoapYearMonth(DateTime value);
public SoapYearMonth (DateTime value);
new System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth : DateTime -> System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth
Public Sub New (value As DateTime)
Parameters
Examples
The following code example shows how to use this constructor.
// Create a SoapYearMonth object.
SoapYearMonth^ year = gcnew SoapYearMonth( DateTime::Now );
Console::WriteLine( "The year is {0}.", year );
// Create a SoapYearMonth object.
SoapYearMonth yearMonth = new SoapYearMonth(DateTime.Now);
Console.WriteLine("The yearMonth is {0}.", yearMonth.ToString());
Applies to
SoapYearMonth(DateTime, Int32)
Initializes a new instance of the SoapYearMonth class with a specified DateTime object and an integer that indicates whether Value is a positive or negative value.
public:
SoapYearMonth(DateTime value, int sign);
public SoapYearMonth (DateTime value, int sign);
new System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth : DateTime * int -> System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth
Public Sub New (value As DateTime, sign As Integer)
Parameters
- sign
- Int32
An integer that indicates whether value
is positive.
Examples
The following code example shows how to use this constructor.
// Create a SoapYearMonth object with a positive sign.
SoapYearMonth^ year = gcnew SoapYearMonth( DateTime::Now,1 );
Console::WriteLine( "The year is {0}.", year );
// Create a SoapYearMonth object with a positive sign.
SoapYearMonth yearMonth = new SoapYearMonth(DateTime.Now, 1);
Console.WriteLine("The yearMonth is {0}.", yearMonth.ToString());
Remarks
An integer of less than 0 indicates a negative sign
.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for