Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Late answer, sorry. Hope you're still up for the challenge!
The problem is that the compiler doesn't know if inside of the foreach something will be returned, so you'd just need to return anything after the foreach, or throw an exception. Then your code should compile
This comment is hidden because it contains spoiler information about the solution
You could also do char.IsUpper(str[i])
have you tried using Char.isUpper instead of Char.IsUpper ?
The problem is the 'case > 3' statement, which falls under what I said :P You could, however, just make it the 'default' case.
The question seems to be answered, so I'll close this.
i tried it too and apparently =>, <, ect. is not allowed in switch cases. we can use "default" after checking for the other cases instead.
You're probably trying to use a newer C# feature that is not supported on current available versions. Relational pattern matching was introduced in C# 9, but only C# 8 is available on CW at the moment.