Caesar Cypher Implementation I am learning C# and for an experiment I tried implementing the Caesar Cypher cryptography method which just offsets every character of the string n characters. How can I make this simple program better?

string original = Console.ReadLine();
string encrypted = "";
int key = 1;
foreach (var l in original)
{
    if (!l.Equals(' '))
    {
        if (l.Equals('z'))
        {
            char next = 'a';
            encrypted += next;
        }
        else
        {

            double next = (int)l + key;
            encrypted += (char)next;
        }
    }
    else
    {
        encrypted += ' ';
    }
}
Console.WriteLine(encrypted);
Afew things I noticed:

Concatenating strings using the plus operator(+), is very inefficient.  Each concatenation creates a new string.  This due to strings being immutable.  Using a char array or the StringBuilder is much more efficient.

The variable next is a double but the value you're assigning to it is 2 ints added together.  It would make much more sense to have this as a char.  In fact you should declare this before the if block to be able to use it in each condition.

Equals isn't doing what you appear to think it does.  Equals is for testing whether 2 objects are the same.  == is for testing whether 2 objects values are the same.

You appear to expect only lower case characters and spaces.  However you don't seem to have any mechanism for testing whether the string complies with that.

You can simplify getting the replacement character by using the modulus(%) operator. Something like this should work:  newChar = (char)(((oldChar - 'a') + key) % 26) + 'a'

Your code won't work right if the string has words from a language that uses two bytes to represent one character.

Right now you've hardcoded the key.  It would be better to have a method that takes the string and the key as parameters.