-
Notifications
You must be signed in to change notification settings - Fork 0
719c29b8 acb2 4088 f1f4 83d959e34399
This method tries to convert provided value into string using provided format as well as provided format provider.
Namespace: Plexdata.LogWriter.Internals.Extensions
Assembly: Plexdata.LogWriter.Abstraction (in Plexdata.LogWriter.Abstraction.dll) Version: 1.0.7.1
C#
public static bool TryFormat<TValue>(
this TValue value,
string format,
IFormatProvider provider,
out string result
)
- value
- Type: TValue
The value to be converted. - format
- Type: System.String
Any of the allowed format string of the type to be converted. - provider
- Type: System.IFormatProvider
The format provider to be used for conversion. - result
- Type: System.String
The string representation of provided value if conversion was successful, andnull
if not.
- TValue
- The type to be converted.
Type: Boolean
True if conversion was successful and false otherwise.
In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
The provided value is converted using provided format provider and does specific string formatting according to provided format.
TypeFormatterExtension Class
TryFormat Overload
Plexdata.LogWriter.Internals.Extensions Namespace