Rediger

Del via


Support.Format(Object, String, FirstDayOfWeek, FirstWeekOfYear) Method

Definition

Caution

Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862

Converts the Visual Basic 6.0 Format function to be compatible with Visual Basic.

public static string Format (object Expression, string Style = "", Microsoft.VisualBasic.FirstDayOfWeek DayOfWeek = Microsoft.VisualBasic.FirstDayOfWeek.Sunday, Microsoft.VisualBasic.FirstWeekOfYear WeekOfYear = Microsoft.VisualBasic.FirstWeekOfYear.Jan1);
[System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")]
public static string Format (object Expression, string Style = "", Microsoft.VisualBasic.FirstDayOfWeek DayOfWeek = Microsoft.VisualBasic.FirstDayOfWeek.Sunday, Microsoft.VisualBasic.FirstWeekOfYear WeekOfYear = Microsoft.VisualBasic.FirstWeekOfYear.Jan1);
static member Format : obj * string * Microsoft.VisualBasic.FirstDayOfWeek * Microsoft.VisualBasic.FirstWeekOfYear -> string
[<System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")>]
static member Format : obj * string * Microsoft.VisualBasic.FirstDayOfWeek * Microsoft.VisualBasic.FirstWeekOfYear -> string
Public Function Format (Expression As Object, Optional Style As String = "", Optional DayOfWeek As FirstDayOfWeek = Microsoft.VisualBasic.FirstDayOfWeek.Sunday, Optional WeekOfYear As FirstWeekOfYear = Microsoft.VisualBasic.FirstWeekOfYear.Jan1) As String

Parameters

Expression
Object

The Object expression to convert.

Style
String

Optional. A String that represents a date format.

DayOfWeek
FirstDayOfWeek

Optional. A FirstDayOfWeek enumeration.

WeekOfYear
FirstWeekOfYear

Optional. A FirstWeekOfYear enumeration.

Returns

A String that contains the formatted data.

Attributes

Remarks

The Visual Basic 6.0 Format function could operate on a Variant data type; in Visual Basic the Variant data type no longer exists. This function is used by the upgrade tools to convert a Variant formatted by using the Format function to a common language runtime-compliant type.

Note

Functions and objects in the Microsoft.VisualBasic.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic 2008. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.

Applies to