User Control VB.Net script Conversion to C#
<pre><code>&lt;script language="VB" runat="server"&gt;
    Public Data As String = "" 
    Public Height As Byte = 25
    Public WidthMultiplier As Byte = 1

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim dictEncoding As StringDictionary
        Dim sbBarcodeImgs As StringBuilder

        Dim strEncodedData As String
        Dim I As Integer

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


        strEncodedData = dictEncoding("*") &amp; "0"
        For I = 1 To Len(Data)
            strEncodedData = strEncodedData &amp; dictEncoding(Mid(Data, I, 1)) &amp; "0"
        Next I
        strEncodedData = strEncodedData &amp; dictEncoding("*")




        sbBarcodeImgs = New StringBuilder()
        For I = 1 To Len(strEncodedData)
            If Mid(strEncodedData, I, 1) = "1" Then
                sbBarcodeImgs.Append("&lt;img src=""images/bar_blk.gif"" width=""" &amp; WidthMultiplier &amp; """ height=""" &amp; Height &amp; """ /&gt;")
            Else
                sbBarcodeImgs.Append("&lt;img src=""images/bar_wht.gif"" width=""" &amp; WidthMultiplier &amp; """ height=""" &amp; Height &amp; """ /&gt;")
            End If
        Next I

        litBarcode.Text = sbBarcodeImgs.ToString
    End Sub
&lt;/script&gt;
&lt;asp:Literal ID="litBarcode" runat="server" /&gt;
</code></pre>

<p>Primarily the MID and dictionary usage are unfamiliar to me. Can this be completely converted to C#?</p>
