ObjectExtensionConvert(Object, Type, NullableNumberStyles, CultureInfo, NullableDateTimeStyles) Method
Converts an object to a specified type.
Namespace: FileHold.LibraryManager.ExtensionsAssembly: FileHold.LibraryManager (in FileHold.LibraryManager.dll) Version: 17.2.0.0
public static Object Convert(
this Object value,
Type targetType,
NumberStyles? numberStyles = null,
CultureInfo cultureInfo = null,
DateTimeStyles? dateTimeStyles = null
)
- value Object
- The object to convert.
- targetType Type
- targeted type
- numberStyles NullableNumberStyles (Optional)
- The number styles.
- cultureInfo CultureInfo (Optional)
- The culture information to use for formatting.
- dateTimeStyles NullableDateTimeStyles (Optional)
- The style of data type.
ObjectThe converted value of the specified type, or null if the conversion fails.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).
Exception | Thrown when the conversion cannot be performed. |