Returns a formatted version of the specified string.
Namespace:
Endeca.Web.UIAssembly: Endeca.Web (in Endeca.Web.dll) Version: 2.1.1.0 (2.1.1.620)
Syntax
| C# |
|---|
public static string Format<T>( string text, string formatValue ) where T : IConvertible |
| Visual Basic (Declaration) |
|---|
Public Shared Function Format(Of T As IConvertible) ( _ text As String, _ formatValue As String _ ) As String |
| Visual C++ |
|---|
public: generic<typename T> where T : IConvertible static String^ Format( String^ text, String^ formatValue ) |
Parameters
- text
- Type: System..::.String
String to format
- formatValue
- Type: System..::.String
Format string indicating the desired format. This must be a format understood by the type specified by T.
Type Parameters
- T
- Indicates the underlying type of text.
Exceptions
| Exception | Condition |
|---|---|
| System..::.ArgumentException | If text is null or empty. |
| System..::.InvalidCastException | If text is not convertible to T. |