C# String Format(IFormatProvider, String, Object[])

Description

String Format(IFormatProvider, String, Object[]) replaces the format items in a specified string with the string representations of corresponding objects in a specified array. A parameter supplies culture-specific formatting information.

Syntax

String.Format(IFormatProvider, String, Object[]) has the following syntax.


public static string Format(
  IFormatProvider provider,//w w  w  .ja  v a  2s.  c om
  string format,
  params Object[] args
)

Parameters

String.Format(IFormatProvider, String, Object[]) has the following parameters.

  • provider - An object that supplies culture-specific formatting information.
  • format - A composite format string.
  • args - An object array that contains zero or more objects to format.

Returns

String.Format(IFormatProvider, String, Object[]) method returns A copy of format in which the format items have been replaced by the string representation of the corresponding objects in args.





















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version