Imports
System
Imports
System.Collections.Generic
Imports
System.Text

Public
Class Code39
Class Code39
Inherits BarcodeVariables
Implements IBarcode.IBarcode

Private C39_Code As New System.Collections.Hashtable()


Public Sub New()Sub New(ByVal input As String)
Raw_Data = input
End Sub

Private Function Encode_Code39()Function Encode_Code39() As String
Me.init_Code39()
Dim result As String = C39_Code("*"c).ToString()
result += "0"

For Each c As Char In Raw_Data
result += C39_Code(c).ToString()

result += "0"
Next
result += C39_Code("*"c).ToString()
Me.C39_Code.Clear()
Return result
End Function


Private Sub init_Code39()Sub init_Code39()
C39_Code.Clear()
C39_Code.Add("0"c, "101001101101")
C39_Code.Add("1"c, "110100101011")
C39_Code.Add("2"c, "101100101011")
C39_Code.Add("3"c, "110110010101")
C39_Code.Add("4"c, "101001101011")
C39_Code.Add("5"c, "110100110101")
C39_Code.Add("6"c, "101100110101")
C39_Code.Add("7"c, "101001011011")
C39_Code.Add("8"c, "110100101101")
C39_Code.Add("9"c, "101100101101")
C39_Code.Add("A"c, "110101001011")
C39_Code.Add("B"c, "101101001011")
C39_Code.Add("C"c, "110110100101")
C39_Code.Add("D"c, "101011001011")
C39_Code.Add("E"c, "110101100101")
C39_Code.Add("F"c, "101101100101")
C39_Code.Add("G"c, "101010011011")
C39_Code.Add("H"c, "110101001101")
C39_Code.Add("I"c, "101101001101")
C39_Code.Add("J"c, "101011001101")
C39_Code.Add("K"c, "110101010011")
C39_Code.Add("L"c, "101101010011")
C39_Code.Add("M"c, "110110101001")
C39_Code.Add("N"c, "101011010011")
C39_Code.Add("O"c, "110101101001")
C39_Code.Add("P"c, "101101101001")
C39_Code.Add("Q"c, "101010110011")
C39_Code.Add("R"c, "110101011001")
C39_Code.Add("S"c, "101101011001")
C39_Code.Add("T"c, "101011011001")
C39_Code.Add("U"c, "110010101011")
C39_Code.Add("V"c, "100110101011")
C39_Code.Add("W"c, "110011010101")
C39_Code.Add("X"c, "100101101011")
C39_Code.Add("Y"c, "110010110101")
C39_Code.Add("Z"c, "100110110101")
C39_Code.Add("-"c, "100101011011")
C39_Code.Add("."c, "110010101101")
C39_Code.Add(" "c, "100110101101")
C39_Code.Add("$"c, "100100100101")
C39_Code.Add("/"c, "100100101001")
C39_Code.Add("+"c, "100101001001")
C39_Code.Add("%"c, "101001001001")
C39_Code.Add("*"c, "100101101101")
End Sub

Public ReadOnly Property Encoded_Value()Property Encoded_Value() As String Implements IBarcode.IBarcode.Encoded_Value
Get
Return Encode_Code39()
End Get
End Property
End Class
最近在考虑VB.NET怎么处理大容量的数据,比如100万条数据,要怎么很快的读出来,或者是查找,在VB.NET里还是满难实现,有这方面的高手们帮帮忙!~谢谢了!