繼承是面向對象軟件的另一種關鍵特性
ASP
<%@ Page Language=
這裡可以看到使用了Inherits關鍵字
繼承其特性
Partial Class _Default
Inherits System
End Class
該類依次繼承了System
下面的
(
(
Public Class Vehicle
Protected _wheels As Integer
Protected _topSpeed As Integer
Protected _warningSound As String
Public Property Wheels() As Integer
Get
Return _wheels
End Get
Set(ByVal value As Integer)
_wheels = value
End Set
End Property
Public Property TopSpeed() As Integer
Get
Return _topSpeed
End Get
Set(ByVal value As Integer)
_topSpeed = value
End Set
End Property
Public Overridable Function Warning() As String
Return _warningSound
End Function
ASP
[
From:http://tw.wingwit.com/Article/program/net/201311/14580.html