StrataFrame Forum

Overriding ToString...

http://forum.strataframe.net/Topic6865.aspx

By StarkMike - 2/16/2007

Say I have a boolean variable named RecurseSubFolders... how can I override the ToString method of this boolean variable?



If the boolean is True, I want the ToString to return -r

If the boolean is False, I want the ToString to return ""



Any ideas?
By Trent L. Taylor - 2/16/2007

Wrap it with a property that returns the value you expect:

Public ReadOnly Property RecurseSubFoldersString As String
    Get
        If _RecurseSubFolders
             Return "YesValue"
        Else
             Return "NoValue"
        End If
 
    End Get
End Property