StringExtensionParseT(String, NullableNumberStyles, IFormatProvider, NullableDateTimeStyles) Method

Converts value to the target type.

Definition

Namespace: FileHold.LibraryManager.Extensions
Assembly: FileHold.LibraryManager (in FileHold.LibraryManager.dll) Version: 17.2.0.0
C#
public static T Parse<T>(
	this string value,
	NumberStyles? numberStyles = null,
	IFormatProvider formatProvider = null,
	DateTimeStyles? dateTimeStyles = null
)

Parameters

value  String
The value to be checked for conversion.
numberStyles  NullableNumberStyles  (Optional)
The number stypes.
formatProvider  IFormatProvider  (Optional)
The format provider.
dateTimeStyles  NullableDateTimeStyles  (Optional)
The date time styles.

Type Parameters

T
The target type to convert to.

Return Value

T
True if the value can be converted to the target type T; otherwise, false.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. 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).

See Also