Share via


BindConverter.TryConvertToDateTimeOffset Method

Definition

Overloads

TryConvertToDateTimeOffset(Object, CultureInfo, DateTimeOffset)

Attempts to convert a value to a DateTimeOffset.

TryConvertToDateTimeOffset(Object, CultureInfo, String, DateTimeOffset)

Attempts to convert a value to a DateTimeOffset.

TryConvertToDateTimeOffset(Object, CultureInfo, DateTimeOffset)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

Attempts to convert a value to a DateTimeOffset.

public:
 static bool TryConvertToDateTimeOffset(System::Object ^ obj, System::Globalization::CultureInfo ^ culture, [Runtime::InteropServices::Out] DateTimeOffset % value);
public static bool TryConvertToDateTimeOffset (object obj, System.Globalization.CultureInfo culture, out DateTimeOffset value);
public static bool TryConvertToDateTimeOffset (object? obj, System.Globalization.CultureInfo? culture, out DateTimeOffset value);
static member TryConvertToDateTimeOffset : obj * System.Globalization.CultureInfo * DateTimeOffset -> bool
Public Shared Function TryConvertToDateTimeOffset (obj As Object, culture As CultureInfo, ByRef value As DateTimeOffset) As Boolean

Parameters

obj
Object

The object to convert.

culture
CultureInfo

The CultureInfo to use for conversion.

value
DateTimeOffset

The converted value.

Returns

true if conversion is successful, otherwise false.

Applies to

TryConvertToDateTimeOffset(Object, CultureInfo, String, DateTimeOffset)

Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs
Source:
BindConverter.cs

Attempts to convert a value to a DateTimeOffset.

public:
 static bool TryConvertToDateTimeOffset(System::Object ^ obj, System::Globalization::CultureInfo ^ culture, System::String ^ format, [Runtime::InteropServices::Out] DateTimeOffset % value);
public static bool TryConvertToDateTimeOffset (object obj, System.Globalization.CultureInfo culture, string format, out DateTimeOffset value);
public static bool TryConvertToDateTimeOffset (object? obj, System.Globalization.CultureInfo? culture, string format, out DateTimeOffset value);
static member TryConvertToDateTimeOffset : obj * System.Globalization.CultureInfo * string * DateTimeOffset -> bool
Public Shared Function TryConvertToDateTimeOffset (obj As Object, culture As CultureInfo, format As String, ByRef value As DateTimeOffset) As Boolean

Parameters

obj
Object

The object to convert.

culture
CultureInfo

The CultureInfo to use for conversion.

format
String

The format string to use in conversion.

value
DateTimeOffset

The converted value.

Returns

true if conversion is successful, otherwise false.

Applies to