C#: How to use arrays, chars and strings? Clear up needed
<p>I am new to programming and I have a project in my Algorithm class. What we have to do is decide on a problem and solve it. We haven't learnt much more than string, char and WriteLine. We did add a couple of things as you will see soon! </p>

<p>I decided that what I want to solve this: The user inserts a word, no matter how long and the program will automatically make the first letter a capital letter. So far this is what I have:</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
    static void Main(string[] args)
    {
    start:
        Console.WriteLine("Please enter a word below:");
        Console.WriteLine("");
        string str = Console.ReadLine();
        char char1;
        if (str[0] &gt;= 97)
        {
            char1 = (char)(str[0] - 32);
        }
        else
        {
            char1 = (char)(str[0] + 32);
        }

        char char2 = (char)(str[1]);
        char char3 = (char)(str[2]);
        char char4 = (char)(str[3]);
        char char5 = (char)(str[4]);
        Console.WriteLine("");
        Console.Write(char1);
        Console.Write(char2);
        Console.Write(char3);
        Console.Write(char4);
        Console.WriteLine(char5);
        goto start;
}
}
}
</code></pre>

<p>The problem with that code is that any word with less than 5 letters will make the program crash. Anything with more than 5 letters will just be cut at the fifth letter... I was told that using arrays should solve this problem. Seeing as I am a total newbie at this, I would need this to be broken down and be as simply told as possible!</p>

<p>Any help getting this to work would be very appreciated. </p>

<p>Thanks :) </p>
