I have this portion of code in C#.
VB Code:
switch (stripCritical) { case "Not critical": ratingNumber = 1; break; case "Less critical": ratingNumber = 2; break; case "Moderately critical": ratingNumber = 3; break; case "Highly critical": ratingNumber = 4; break; case "Extremely critical": ratingNumber = 5; break; }
The problem is that if something comes accross as "Not Critical" then it doesnt match. How can I make this switch statement ignore case?
Thanks in advance.




Reply With Quote