เมธอด DateTime.DaysInMonth() ใน C# คืนจำนวนวันในเดือนและปีที่ระบุ เช่น 31 สำหรับเดือนมกราคม (เดือนที่ 1) ไวยากรณ์ public static int DaysInMonth(int year, int month); ตัวอย่างที่ 1: ตรวจสอบจำนวนวันในเดือนต่างๆ using System; public class Demo { public static void Main() { DateTime d