I would personally use a Dictionary(Of String, String) and not use LINQ at all for this situation:
Example: https://dotnetfiddle.net/UaqKojCode:Dim bookAbbrList = New Dictionary(Of String, String)() From { { "gen", "Genesis" }, { "exo", "Exodus" }, { "lev", "Leviticus" }, { "num", "Numbers" }, { "deu", "Deuteronomy" }, { "jos", "Joshua" } } Console.Write("Book Abbreviation: ") Dim abbreviation = Console.ReadLine() If (bookAbbrList.ContainsKey(abbreviation)) Then Dim fullName = bookAbbrList(abbreviation) Console.WriteLine(fullName) End If




Reply With Quote