最新下载
热门教程
- 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()
相关文章
- 王者荣耀苍和成吉思汗技能区别介绍 王者荣耀苍与成吉思汗技能对比分析 07-01
- 吾今有世家参军步骤-吾今有世家参军玩法 07-01
- PS给照片添加柔光效果塑造黄昏暮色笼罩氛围 07-01
- Princess Striker Gem(PRSG币)近期会暴跌? 07-01
- 心动小镇黄金鬼楸在哪里 黄金鬼楸位置介绍 07-01
- 吾今有世家如何考状元-吾今有世家考状元的技巧 07-01