The ToString Method and Format Strings : ToString « Class Module « VB.Net Tutorial






Module Example
   Public Sub Main()
        Dim thisDay As DayOfWeek = DayOfWeek.Monday
        Dim formatStrings() As String = {"G", "F", "D", "X"}
        
        For Each formatString As String In formatStrings
           Console.WriteLine(thisDay.ToString(formatString))
        Next
   End Sub
End Module








6.33.ToString
6.33.1.Override ToString method
6.33.2.Overriding the ToString Method
6.33.3.Default Formatting Using the ToString Method
6.33.4.The ToString Method and Format Strings