An object that implements the IFormatProvider interface is a format provider. A format
provider??™s common task within the .NET Framework is to provide culture-specific formatting
information, such as what character to use for monetary amounts, for decimal separators, and so
on. When you pass Nothing for this parameter, the format provider that IFormattable.ToString()
uses is typically the CultureInfo instance returned by System.Globalization.CultureInfo.
CurrentCulture and My.Application.Culture. This instance of CultureInfo is the one that
matches the culture that the current thread uses. However, you have the option of overriding it
by passing a different CultureInfo instance, such as one obtained by creating a new instance of
CultureInfo and passing into its constructor a string representing the desired locale. Finally, you
can even provide a culture-neutral CultureInfo instance by passing the instance provided by
CultureInfo.InvariantCulture.
nNote Instances of CultureInfo are used as a convenient grouping mechanism for all formatting
information relevant to a specific culture. For example, one CultureInfo instance could represent the
cultural-specific qualities of English spoken in the United States, while another could contain properties
specific to English spoken in the United Kingdom.
Pages:
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288