Many places in the code were updated from using Convert.ToXXX to ConvertInvariant<T>.
The existing ConvertInvariant<T> implementation would throw an error when attempting
to convert a null value into a value type, such as null -> decimal. This change
preserves the null conversion behavior by delegating to the appropriate Convert.ToXXX
method under the hood.
Fixes#3584
Adds static methods of the form Parse.<TypeName>(string str) that use
CultureInfo.InvariantCulture. These are to be used when parsing strings.
It's still safe (from the CA1304/CA1305 perspective) to use the ToDecimal
extension method for decimals.
Adds string extension methods for common operations that will now require
CultureInfo.InvariantCulture. These are to be used when converting values
to strings, such as ToStringInvariant()/ToStringInvariant(format), but also
useful for searching within strings, StartsWithInvariant, EndsWithInvariant
and IndexOfInvariant.