String type comparison and sorting

When strings are used for internal programming purposes, such as pathnames, filenames, variables, etc., rather than being displayed to the user,

The version of StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase should be used,

Because ignoring language and culture is the fastest way to compare strings.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324643508&siteId=291194637