I have to return the text based on the input format used in formula. So,
When I used to check String.IndexofAny()
in Framework 4.6 it returns -1
even if the character is present.
Example :
Formula : =TEXT(TODAY(),"MMMM");
textFormat = "MMMM";
char[] formats = { 'M', 'D', 'Y', 'S', 'T' };
Condition | Framework 4.6 | .NET50 |
---|---|---|
textFormat.IndexofAny(formats) |
-1 | 0 |
Can someone help me with the exact reason and solution?