Mega Code Archive

 
Categories / VB.Net Tutorial / Class Module
 

Implement an interface

Class YourClass     Implements IFormattable     Public Value As String     Public Overridable Overloads Function ToString(ByVal _       Format As String, ByVal Provider As IFormatProvider) _       As String Implements IFormattable.ToString         ToString = Value     End Function     Public Sub New(ByVal Value As String)         Me.Value = Value     End Sub End Class Module Module1     Sub Main()         Dim A As New YourClass("Hello VB.Net World")         Dim S As New String("Hello")     End Sub End Module