And I would like to know how could I in dictionary use a specific time range to display the appropriate message.
For example
If it's lunchtime, then one message.
If it is morning now, time is something else.
My attempt here
- namespace ConsoleApp1
- {
-
- class Program
- {
- static string Method()
-
- {
- Console.WriteLine("The Timespan is : {0}", variable);
- }
- static void Main(string[] args)
- {
- var greetings = new List<object>() {"Good morning", "Good day", "Good evenining"};
- var timePoints = new List<object>() { 9, 12, 15, 22};
-
- for (int i = 0; i < greetings.Count; i++)
- {
-
- }
- }
- }
- }