' 本程序为学习而写 , 没有任何实际意义 VB.NET
Public Class Point
Private x As Single 'X Coordinate
Private y As Single 'Y Coordinate
..........................
End Class
Public Class Line
Inherits Point
Private vertexA As Point
Private vertexB As Point
Public Function SlopeOfLine() As Object
Dim slope As Single
If vertexA.propertyX = vertexB.propertyX Then
slope = False 'false stands for that this line' slope dosn't exist.
Else
slope = (vertexA.propertyY - vertexB.propertyY) / _
(vertexA.