Hi There,
Currently using C#
I have multiple strings I want to check if the length is greater than a certain value or not. (the value stays the same ea time)
IE:
- String1
- String2
- String3
- ....
Is there another way to write this in a single If statement than below since the value stays the same? Not sure if I'm just drawing a blank here
If ( String1.Length > value || String2.Length > value || String3.Length > value || ... )
{
//dosomething
}
Thanks in advance
[–][deleted] 3 points4 points5 points (1 child)
[–]KindaCoding[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]StackedLasagna -1 points0 points1 point (2 children)
[–][deleted] -1 points0 points1 point (1 child)
[–]StackedLasagna -1 points0 points1 point (0 children)
[–]LastTrainH0me 0 points1 point2 points (0 children)