C#, string comparison InvariantCultureIgnoreCase vs OrdinalIgnoreCase?

Posted by JL on Stack Overflow See other posts from Stack Overflow or by JL
Published on 2010-05-01T11:00:08Z Indexed on 2010/05/01 11:07 UTC
Read the original article Hit count: 174

Filed under:
|

Which would be better code:

int pos = file.dmFileDescr.LastIndexOf(".", StringComparison.InvariantCultureIgnoreCase);

or

int pos = file.dmFileDescr.LastIndexOf(".", StringComparison.OrdinalIgnoreCase);

© Stack Overflow or respective owner

Related posts about c#

Related posts about strings