C# sorting an array of chars without the use of a method
<p>I have an array of structs of people. Each one of these guys has a parameter string for name and a string for surname. And now I have to sort the array and write it out by checking each character. And if there are two persons with the same name, I have to check the each character of their surnames too.
So lets say we have:</p>

<p>JOHN DOE
JOHN ABCD</p>

<p>The output would be
JOHN ABCD
JOHN DOE</p>

<p>This is what I've got so far:</p>

<pre><code>string abeceda = "ABCČDEFGHIJKLMNOPRSŠTUVZŽabcčdefghijklmnoprsštuvzž";

char[] poljelegalnihznakov = new char[abeceda.Length];
for (int i = 0; i &lt; abeceda.Length;i++)
{
    char c=abeceda[i];
    poljelegalnihznakov[i] = c;
}

for (int i = 0; i &lt; stevilodelavcev; i++)
{
    string imedelavca = delavcipolje[i].ime;
    char[] ime = SortirajDelovnoStevilko(imedelavca);
}
</code></pre>

<p>The abeceda string is basically all the chars of my countries alphabet. I'm not sure I will use this array of chars but I just wrote it out.</p>

<p>How would we sort this without the use of array.sort() or such other methods?(since I'm not allowed to use any easy functions...).</p>

<p>This is my struct:</p>

<pre><code>public struct delavci
{
    public string delovnastevilka;
    public string priimek;
    public string ime;
    public int delovnadoba;
    public int starost;


    public delavci(string delovnastevilka, string priimek, string ime, int delovnadoba, int starost)
    {
        this.delovnastevilka = delovnastevilka;
        this.priimek = priimek;
        this.ime = ime;
        this.delovnadoba = delovnadoba;

        this.starost = starost;
    }

}
</code></pre>