C# for loop and encryption : <p>I'm Kind of new to C# but since i have learned other programming languages before, learning it is going pretty well, However I am stuck on this one part, I am trying to "port" my old python application that takes a string or the users input and encrypts it. the python code is below, My problem is doing everything after and including the for loop. How might i go about searching for each letter in the Character string.</p>

<pre><code>CHARACTER= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-=+_)(*&amp;^%$#@!?&gt;&lt;|:;}{]["

translated = ''


for uniqueKey in message:
    if uniqueKey in CHARACTER:
        num = CHARACTER.find(uniqueKey)

        if mode == "encrypt":
            num += key
        elif mode == "decrypt":
            num -= key
        if num &gt;= len(CHARACTER):
            num -= len(CHARACTER)
        elif num &lt; 0:
            num += len(CHARACTER)

        translated = translated + CHARACTER[num]
    else:
        translated = translated + uniqueKey 
</code></pre>
