RHT Services Forum

Full Version: Checking If Var is in Range/List
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When you were going through the IfElse statements for this week using letters, I was trying to look up if there was a way to see if a letter was in 'a':'z' without having to type everything individually in the IfElse? Is there a way to do that? I found this bit of code online, but I couldn't understand what it was doing..

Code:
var list = Enumerable.Range('a', 'z' - 'a' + 1).Select(c => (char)c).ToList();