DateTimeToStringConverter.Convert Method
Convert DateTime to String. If value is null or is not typed DateTime, String.Empty (or String in parameter[1]) is returned.
Namespace: Microsoft.TeamFoundation.Controls.WPF.Converters
Assembly: Microsoft.TeamFoundation.Controls (in Microsoft.TeamFoundation.Controls.dll)
Syntax
'Declaration
Public Overridable Function Convert ( _
value As Object, _
targetType As Type, _
parameter As Object, _
culture As CultureInfo _
) As Object
public virtual Object Convert(
Object value,
Type targetType,
Object parameter,
CultureInfo culture
)
public:
virtual Object^ Convert(
Object^ value,
Type^ targetType,
Object^ parameter,
CultureInfo^ culture
)
abstract Convert :
value:Object *
targetType:Type *
parameter:Object *
culture:CultureInfo -> Object
override Convert :
value:Object *
targetType:Type *
parameter:Object *
culture:CultureInfo -> Object
public function Convert(
value : Object,
targetType : Type,
parameter : Object,
culture : CultureInfo
) : Object
Parameters
value
Type: System.ObjectDateTime (can be null)
targetType
Type: System.Typeoutput type - Must be String
parameter
Type: System.Objectoptional String or String[]. Parameter[0] as the DateTime format (like "g"). Parameter[1] as the default output string if input value is null or is not typed DateTime. If only the DateTime format is needed, the formatting String can be used instead of String[].
culture
Type: System.Globalization.CultureInfocaller culture
Return Value
Type: System.Object
converted date time text
Implements
IValueConverter.Convert(Object, Type, Object, CultureInfo)
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.