Public Class Class1

    Public Function GetTime(ByVal ShowSeconds As Boolean) As String
        ' The formatting of dates, and the returning of values of functions,
        ' changed somewhat in VB.NET

        If (ShowSeconds = True) Then
            Return Now().ToLongTimeString
        Else
            Return Now().ToShortTimeString
        End If

    End Function

    ' This method overrides the ToString method of the
    ' universal base class System.Object

    Public Overrides Function ToString() As String

        ' Call the base class's ToString method and get the result.
        ' You don't have to do this if you don't want to. I did,
        ' for demo purposes. 

        Dim BaseResult As String
        BaseResult = MyBase.ToString

        ' Construct response string with base class's string plus
        ' my own added information. The net result here is that
        ' I'm pigybacking on the base class, not completely
        ' replacing it. 

        Return "You have reached the overriding class.  The base class says: " + BaseResult


    End Function

End Class
