All pastes #93268 Raw Edit

Something

public text v1 · immutable
#93268 ·published 2006-07-20 09:54 UTC
rendered paste body
/// <summary>Replaces the format item in a specified <see cref="T:System.String"></see> with the text equivalent of the value of a corresponding <see cref="T:System.Object"></see> instance in a specified array. A specified parameter supplies culture-specific formatting information.</summary>
/// <returns>A copy of format in which the format items have been replaced by the <see cref="T:System.String"></see> equivalent of the corresponding instances of <see cref="T:System.Object"></see> in args.</returns>
/// <param name="args">An <see cref="T:System.Object"></see> array containing zero or more objects to format. </param>
/// <param name="format">A <see cref="T:System.String"></see> containing zero or more format items. </param>
/// <param name="provider">An <see cref="T:System.IFormatProvider"></see> that supplies culture-specific formatting information. </param>
/// <exception cref="T:System.FormatException">format is invalid.-or- The number indicating an argument to format is less than zero, or greater than or equal to the length of the args array. </exception>
/// <exception cref="T:System.ArgumentNullException">format or args is null. </exception>
/// <filterpriority>1</filterpriority>
public static string Format(IFormatProvider provider, string format, params object[] args)
{
      if ((format == null) || (args == null))
      {
            throw new ArgumentNullException((format == null) ? "format" : "args");
      }
      StringBuilder builder1 = new StringBuilder(format.Length + (args.Length * 8));
      builder1.AppendFormat(provider, format, args);
      return builder1.ToString();
}