Which would be better code:

int index = fileName.LastIndexOf(".", StringComparison.InvariantCultureIgnoreCase);

or

int index = fileName.LastIndexOf(".", StringComparison.OrdinalIgnoreCase);

4 Answers
4

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *