But if you were not the original author of the Complex type, then this would be
your only way to provide custom formatting for that type. Using this method, you can
provide custom formatting to any of the other built-in types in the system.
Comparing Strings
When it comes to comparing strings, the .NET Framework provides quite a bit of flexibility. You
can compare strings based on cultural information as well as without cultural consideration.
You can also compare strings using case sensitivity or not, and the rules for how to do caseinsensitive
comparisons vary from culture to culture. There are several ways to compare strings
offered within the Framework, some of which are exposed directly on the System.String type
through the static String.Compare method. You can choose from a few overloads, and the most
basic of them use the CultureInfo attached to the current thread to handle comparisons.
You often need to compare strings and don??™t want to carry the overhead of culturespecific
comparisons. A perfect example is when you??™re comparing internal string data from
a configuration file or when you??™re comparing file directories. The .NET Framework introduces
a new enumeration, StringComparison, which allows you to choose a true non-culture-based
comparison.
Pages:
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303