请问什么是DIM接口?
接口 (interface)
对协定进行定义的引用类型。其他类型实现接口,以保证它们支持某些操作。接口指定必须由类提供的成员或实现它的其他接口。与类相似,接口可以包含方法、属性、索引器和事件作为成员。
--------------------------------------
leon2 附加:
接口中可以声明属性、方法、事件和类型(Structure),(但不能声明变量),但是并不能设置这些成员的具体值,也就是说,只能定义,不能给它里面定义的东西赋值。
下面是个 VB.NET 2003 的例子。
在 VB.NET 的类里,实现一个接口的语句是:
implements 接口名称
例如,下面定义一个车(总称)的接口,这里的车是各种车的总称:
Public Interface ICar
Property color() As String
Property speed() As Long
Sub PrintInfo()
End Interface
然后在不同类型的“车”类里实现它:
Public Class A_Car
Implements ICar
Dim m_color As String, m_speed As Long
Public Property color() As String Implements ICar.color
Get
Return m_color
End Get
Set(ByVal Value As String)
m_color = Value
End Set
End Property
Protected Overrides Sub Finalize()
MsgBox("I was deconstructed!")
End Sub
Public Sub New()
m_color = "Red"
m_speed = 210
MsgBox("I was constructed!")
End Sub
Public Property speed() As Long Implements ICar.speed
Get
Return m_speed
End Get
Set(ByVal Value As Long)
m_speed = speed
End Set
End Property
Public Sub PrintInfo() Implements ICar.PrintInfo
MsgBox("Color: " & m_color & vbNewLine & "Speed: " & m_speed, MsgBoxStyle.Information)
End Sub
End Class
在 Form 的 Load 事件中编写:
Dim myCar As New A_Car
myCar.PrintInfo()
运行之后就创建了一个 A_Car 类的实例 myCar,然后出现两个对话框,分别说明实例已经创建和汽车的信息。当窗体卸载时,这个类的实例 myCar 将自动销毁,这时将出现一个“I was deconstructed!”的对话框。
SAP起源于Systems Application, Products in DATA processing. SAP既是公司名称,又是其ERP (Enterprise-wide Resource Planning)软件名称.
SAP是目前最大的欧洲软件企业,坐落在德国的瓦尔多夫。
由五个IBM员工于1972年创立,主要生产ERP系统。
主要产品有SAP R/3, SAP B1, SAP A1等。
坐落在上海张江软件园区的SAP中国研究院主要负责面向中小企业的SAP B1的研发工作。