mscorlib(4.0.0.0) API with additions
FormattableString.cs
2 
3 namespace System
4 {
6  [__DynamicallyInvokable]
7  public abstract class FormattableString : IFormattable
8  {
11  [__DynamicallyInvokable]
12  public abstract string Format
13  {
14  [__DynamicallyInvokable]
15  get;
16  }
17 
20  [__DynamicallyInvokable]
21  public abstract int ArgumentCount
22  {
23  [__DynamicallyInvokable]
24  get;
25  }
26 
29  [__DynamicallyInvokable]
30  public abstract object[] GetArguments();
31 
35  [__DynamicallyInvokable]
36  public abstract object GetArgument(int index);
37 
41  [__DynamicallyInvokable]
42  public abstract string ToString(IFormatProvider formatProvider);
43 
48  [__DynamicallyInvokable]
49  string IFormattable.ToString(string ignored, IFormatProvider formatProvider)
50  {
51  return ToString(formatProvider);
52  }
53 
59  [__DynamicallyInvokable]
60  public static string Invariant(FormattableString formattable)
61  {
62  if (formattable == null)
63  {
64  throw new ArgumentNullException("formattable");
65  }
66  return formattable.ToString(CultureInfo.InvariantCulture);
67  }
68 
71  [__DynamicallyInvokable]
72  public override string ToString()
73  {
75  }
76 
78  [__DynamicallyInvokable]
79  protected FormattableString()
80  {
81  }
82  }
83 }
static CultureInfo InvariantCulture
Gets the T:System.Globalization.CultureInfo object that is culture-independent (invariant).
Definition: CultureInfo.cs:263
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
Definition: __Canon.cs:3
Provides a mechanism for retrieving an object to control formatting.
string ToString(string format, IFormatProvider formatProvider)
Formats the value of the current instance using the specified format.
abstract string Format
Returns the composite format string.
FormattableString()
Instantiates a new instance of the T:System.FormattableString class.
abstract int ArgumentCount
Gets the number of arguments to be formatted.
abstract string ToString(IFormatProvider formatProvider)
Returns the string that results from formatting the composite format string along with its arguments ...
override string ToString()
Returns the string that results from formatting the composite format string along with its arguments ...
static string Invariant(FormattableString formattable)
Returns a result string in which arguments are formatted by using the conventions of the invariant cu...
abstract object [] GetArguments()
Returns an object array that contains one or more objects to format.
static CultureInfo CurrentCulture
Gets or sets the T:System.Globalization.CultureInfo object that represents the culture used by the cu...
Definition: CultureInfo.cs:120
Provides information about a specific culture (called a locale for unmanaged code development)....
Definition: CultureInfo.cs:16
Provides functionality to format the value of an object into a string representation.
Definition: IFormattable.cs:8
Represents a composite format string, along with the arguments to be formatted.
abstract object GetArgument(int index)
Returns the argument at the specified index position.