home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic .NET - Read Less - Learn More
/
Visual_Basic.NET_Read_Less_Learn_More_Richard_Bowman_Visual_2002.iso
/
Resources
/
Code
/
Ch8-OverloadAMethod
/
Module1.vb
< prev
Wrap
Text File
|
2001-08-08
|
506b
|
18 lines
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