Hello
I try to use dictionaries
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++)
- {
- //System.Console.WriteLine(i + 1 + " Pair:" + "\n" + "C# type inside IL is: " + greetings[i].GetType() + "\n" + timePoints[i].GetType() + "\n");
- }
- }
- }
- }
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Madan ShekarPosted Jul 5, 2019, 4:22 AM