I want to search from the array. This is my code
string[] Main_Events = { "Five Ships In The Harbour", "Australia Day", "Christmas", "New Years", "The Melbourne Cup", "Australian Open Tennis" };
string search_str = "Australia Day";
string value1 = Array.Find(Main_Events, element => element.Contains(search_str));
The search works fine if i search Australia Day but if the search is The Australia Day. The value of value1 is null.
How can i search if the search value is The Australia Day and in the array the value is Australia Day then the value of value1 should be Australia Day or true.
I am using Array.Find because i want to search from 5 different arrays. Like Main_Events, i have four other arrays.
Thanks in advance
searchmethod. I think you know why it is returningnullonThe Australia Day.