ObjectExtensionTryConvertT(Object, NullableNumberStyles, CultureInfo, NullableDateTimeStyles, T) Method
Attempts to convert an object to a specified type.
Namespace: FileHold.LibraryManager.ExtensionsAssembly: FileHold.LibraryManager (in FileHold.LibraryManager.dll) Version: 17.2.0.0
public static bool TryConvert<T>(
this Object value,
NumberStyles? numberStyles,
CultureInfo cultureInfo,
DateTimeStyles? dateTimeStyles,
out T targetValue
)
- value Object
- The object to convert.
- numberStyles NullableNumberStyles
- The number styles.
- cultureInfo CultureInfo
- Optional culture information to use during conversion.
- dateTimeStyles NullableDateTimeStyles
- The style of data type.
- targetValue T
- The converted value if the conversion is successful, otherwise default.
- T
- The target type to convert to.
BooleanTrue if the conversion is successful, otherwise false.In Visual Basic and C#, you can call this method as an instance method on any object of type
Object. 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).