最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
.NET中自己构建一个ArrDictionary
时间:2022-07-02 10:54:58 编辑:袖梨 来源:一聚教程网
以下是ArrDictionary类:
Public Class ArrDictionary
Private objCollection As New Collection
Private objDic As New DictionaryEntry
Private strKey, strValue As String
Public i As Integer
Public Function Item(ByVal Index As Integer) As Object
Try
Item = objCollection.Item(Index)
Catch ex As Exception
Item = "错误,无此项!"
End Try
End Function
Public Function Item(ByVal Key As String) As Object
Try
Item = objCollection.Item(Key)
Catch ex As Exception
Item = "错误,无此项!"
End Try
End Function
Public Sub Add(ByVal Key As String, ByVal Value As String)
objDic.Key = Key
objDic.Value = Value
objCollection.Add(objDic, objDic.Key)
i += 1
End Sub
Protected Overrides Sub Finalize()
Public Class ArrDictionary
Private objCollection As New Collection
Private objDic As New DictionaryEntry
Private strKey, strValue As String
Public i As Integer
Public Function Item(ByVal Index As Integer) As Object
Try
Item = objCollection.Item(Index)
Catch ex As Exception
Item = "错误,无此项!"
End Try
End Function
Public Function Item(ByVal Key As String) As Object
Try
Item = objCollection.Item(Key)
Catch ex As Exception
Item = "错误,无此项!"
End Try
End Function
Public Sub Add(ByVal Key As String, ByVal Value As String)
objDic.Key = Key
objDic.Value = Value
objCollection.Add(objDic, objDic.Key)
i += 1
End Sub
Protected Overrides Sub Finalize()
相关文章
- 逍遥九重天孙悟空技能有哪些 逍遥九重天孙悟空技能图鉴大全2024 06-20
- 《剑侠情缘零》剑阁1v1技能及打法推荐 06-20
- 《永远的蔚蓝星球》第11~14关满星攻略 06-20
- 龙族卡塞尔之门诺玛技能是什么 龙族卡塞尔之门诺玛技能一览 06-20
- 《永远的蔚蓝星球》第15关女皇领地满星攻略 06-20
- 万龙觉醒莉莉娅天赋如何加点 莉莉娅天赋加点推荐 06-20