Imports System Imports System.Collections.Generic Module LookbackProgram Class Event2 Public Property Description As String Public Property EventDate As DateTime Public Sub New(description As String, eventDate As DateTime) Me.Description = description Me.EventDate = eventDate End Sub Public Overrides Function ToString() As String Return $"{EventDate.ToShortDateString()}: {Description}" End Function End Class Sub Main() Dim events As New List(Of Event2) From { New Event2("Project Start", New DateTime(2023, 10, 1)), New Event2("First Milestone", New DateTime(2023, 10, 15)), New Event2("Second Milestone", New DateTime(2023, 11, 1)), New Event2("Final Review", New DateTime(2023, 11, 15)) } Console.WriteLine("Enter the number of days to look back:") Dim days As Integer If Integer.TryParse(Console.ReadLine(), days) Then Dim lookbackDate = DateTime.Now.AddDays(-days) Console.WriteLine($"Events in the past {days} days (since {lookbackDate.ToShortDateString()}):") Dim foundEvents = events.Where(Function(e) e.EventDate >= lookbackDate).ToList() If foundEvents.Any() Then For Each evt In foundEvents Console.WriteLine(evt) Next Else Console.WriteLine("No events found in the specified lookback period.") End If Else Console.WriteLine("Invalid input. Please enter a valid number of days.") End If Console.ReadLine() End Sub End Module