Hours property

int Hours
Gets or sets the hours.

Implementation

int get Hours => this.hours;
void Hours=(int value)

Implementation

set Hours(int value) {
  if (value >= 0 && value < 24) {
    this.hours = value;
  } else {
    throw new ArgumentException("HourMustBeBetween0And23");
  }
}