Public Enum Server
Access
SqlServer
End Enum
public property TypeofData() as Server
Get
Return DataType
End Get
Set(ByVal Value As Server)
DataType = Value
End Set
end property
可能我说的很含糊,举个例子:
Dim DataType as long '判断数据库的类型是Access还是SQLserver
const Access as long=1
const SQLServer as long=2
public property TypeofData() as long
Get
Return DataType
End Get
Set(ByVal Value As long)
if value=Access or value=SQLServer then
DataType = Value
end if
End Set
end property