Drawing a hollow rectangle of rows and column provided by the console application
static void DrawLine(int w, char ends, char mids)
    {
        Console.Write(ends);
        for (int i = 1 ; i &lt; w-1 ; ++i)
            Console.Write(mids);
        Console.WriteLine(ends);
    }

    static void DrawBox(int w, int h)
    {
        DrawLine(w, '*', '*');
        for (int i = 1; i &lt; h-1; ++i)
            DrawLine(w, '*', ' ');
        DrawLine(w, '*', '*');
    }

    static void Main()
    {
        DrawBox(10, 10);
    }