[c#] 시간 계산하기 – TimeOnly
DateTime은 날짜와 시간을 모두 값으로 갖고 DateOnly는 날짜만 TimeOnly는 시간만 갖는다. 하루 안에서 시간들을 연산하려면 TimeOnly를 쓰는 게 편하다. TimeOnly를 이용할 때 주의해야 할 게 있다. 아래 코드는 -00:00:01을 반환하지 않는다. Because TimeOnly only represents a 24-hour period, it rolls over forwards or backwards appropriately when adding values supplied to those three methods.How to use the DateOnly…