Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
任意の日時を取り、その年の開始日と終了日を返す 2 つまたは 1 つの (out) C# メソッドが必要です。
void Dates(DateTime d, out DateTime b, out DateTime e) { b = new DateTime(d.Year, 1, 1); e = new DateTime(d.Year, 12, 31); }
DateTime startDate = new DateTime(year, 1, 1); DateTime endDate = new DateTime(year, 12, 31);