home *** CD-ROM | disk | FTP | other *** search
- Public Class Math
- Public Overloads Function Add(ByVal x As Integer, _
- ByVal y As Integer) As Integer
- Return x + y
- End Function
- Public Overloads Function Add(ByVal x As Single, _
- ByVal y As Single) As Single
- Return x + y
- End Function
- End Class
- Module Module1
- Sub Main()
- Dim math As New Math(), n As Integer = 5, m As Integer = 10
- Console.WriteLine(math.Add(n, m))
- Console.ReadLine()
- End Sub
- End Module
-