Practice ยท 2 of 4
Case-insensitive extension check
CHALLENGE
Difficulty: beginner+25 XP
Implement static bool HasExtension(string fileName, string ext) โ true when fileName ends with ext ignoring letter case. HasExtension("photo.JPG", ".jpg") is true. Null on either side yields false.
Press Submit to check your solution.
Back to lesson: Practice: Text workshop