String reversal, capitalize vowels, lowercase consonants This was a portion of a skills test given to me by a company. The task was to write a method that takes a string, reverses it, and sets the vowels as capitals and consonants to lowercase. I was also told to prove that my implementation works.

using System;
using System.Diagnostics;


namespace StringOperation
{
    using static Console;

    internal class Program
    {
        #region Entry

        private static void Main()
        {
            while (true)
            {
                WriteLine(MessageStrings.REQUEST_NAME);
                var strResult = ReadLine();

                var result = ProcessInput(string.IsNullOrEmpty(strResult) ? MessageStrings.PROOF : strResult );

                if ((ReadKey(true).Key ^ ConsoleKey.Y) == 0)
                    continue;
                break;
            }
        }

        #endregion

        #region Logic

        private static string ProcessInput(string input)
        {
            var output = new char[input.Length];

            var desc = output.Length;
            var asnd = -1;

            while(asnd++ &lt;= desc--)
            {
                // unroll and reverse
                output[asnd] = Shift(input[desc]);
                output[desc] = Shift(input[asnd]);                  
            }

            return new string(output);
        }

        private static char Shift(char target)
        {
            // switching the 32 bit and returning the new value
            var i = (target | 0x20);

            // Checking if a the new value is a symbol
            if (i &lt; 97 || i &gt; 122)
                return target;

            switch (i)
            {

                case 97:
                case 101:
                case 105:
                case 111:
                case 117:
                    // Returning a capital vowel
                    return (char) (target &amp; ~0x20);
                default:
                    // returning Lower case consonant
                    return (char) (i);
            }
        }

        #endregion
    }
}
We have a namespace called StringOperation,
a class called Program,
and methods called Main,
ProcessInput, Shift,
regions called Entry, Logic.

Looking from a high level,
this program could do anything,
as these terms are completely meaningless.
Strive to find more meaningful names for your program elements,
so that readers can have a clue what the program is about without having to fully read the implementation.
If I can see in front of me the logical pieces of the puzzle,
the mental burden of understanding what goes on in each element would be much reduced.

I know that all self-respecting programmers know by heart that 97 means the ASCII code of the letter A, 101 the letter E, 105 the letter I, ...
Wait a minute, no, actually that's not a requirement,
I don't think anybody should have to know at a glance what these numbers mean in your case statements.
A better way would be to write like this:

case 'A':
case 'E':
case 'I':
// ...