![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
There are two variants: public static string Format(string, params object[]); and public static string Format(IFormatProvider, string, params object[]); What happens if i will use String.Format("{0} and {1}", "one", "two") instead of String.Format(System.Globalization.CultureInfo.Cur rentCulture, "{0} and {1}", "one", "two")? What differense between these two methods? |
|
Then i use FxCop i have a lot of errors with this resolution: "The call to 'String.Format(String format, Object arg0)' does not explicitly provide IFormatProvider. This should be replaced with a call to an overload that does: String.Format(IFormatProvider provider, String format, Object[] args)" Is this really Critical? |
#3
| |||
| |||
|
|
Hello, all! I have question about String.Format method. There are two variants: public static string Format(string, params object[]); and public static string Format(IFormatProvider, string, params object[]); What happens if i will use String.Format("{0} and {1}", "one", "two") instead of String.Format(System.Globalization.CultureInfo.Cur rentCulture, "{0} and {1}", "one", "two")? What differense between these two methods? Then i use FxCop i have a lot of errors with this resolution: "The call to 'String.Format(String format, Object arg0)' does not explicitly provide IFormatProvider. This should be replaced with a call to an overload that does: String.Format(IFormatProvider provider, String format, Object[] args)" Is this really Critical? Thanks alot, Alex. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |