Пример #1
0
 /// <summary>
 /// Adds a date field to the current active message. Please note that all dates and times are expressed in UTC.
 /// </summary>
 /// <param name="tag">The field tag.</param>
 /// <param name="year">The year of the date field value.</param>
 /// <param name="month">The month of the date field value.</param>
 /// <param name="day">The day of the date field value.</param>
 /// <returns><see langword="true" /> if the field was successfully added, or <see langword="false" /> if the value could not be added (because there was no more memory, the message handle does not contain any messages, or the supplied value is not of the type specified).</returns>
 /// <exception cref="InvalidOperationException">The installed version of the native library doesn't include the mdf_message_add_date2 function.</exception>
 /// <exception cref="ObjectDisposedException">The <see cref="Message"/> instance has been disposed.</exception>
 /// <remarks>The corresponding native function is mdf_message_add_date2.</remarks>
 public bool AddDate(uint tag, int year, int month, int day)
 {
     ThrowIfDisposed();
     return(_nativeImplementation.mdf_message_add_date2(Handle, tag, year, month, day) == 1);
 }