Ceasar Cipher (Rot 13)
You could use the modulo operator instead of conditions:

static string Encrypt(string toEncrypt, int shift)
{
    const int alphabetLength = 'z' - 'a' + 1;
    char[] buffer = toEncrypt.ToCharArray();

    for (int i = 0; i &lt; buffer.Length; i++)
    {
        char letter = (char)(buffer[i] - 'a'); // Let the `letter` be an offset from 'a'
        letter = (char)((letter + shift) % alphabetLength);
        buffer[i] = (char)(letter + 'a');
    }
    return new string(buffer);
}


Or almost one-liner:

static string Encrypt(string toEncrypt, int shift)
{
    const int alphabetLength = 'z' - 'a' + 1;
    return new string(Array.ConvertAll(toEncrypt.ToCharArray(), 
        c =&gt; (char)('a' + (c - 'a' + shift) % alphabetLength)));
}