Census data from file input (text)
user2023861 covers a lot of good ground, so I just have a couple more things to add.

First, instead of using parallel arrays, you might want to consider using a collection container like a List and filling it with objects.  Each line appears to a distinct record with a set of properties, so I would make them a simple Class:

public class Record
{
    public int Age { get; set; }
    public string Gender { get; set; }
    public string MaritalStatus { get; set; }
    public int District { get; set; }
}


That way, you don't have to hard code the size of the arrays that you are using, and you don't have to do any work to keep the related pieces of the record in synch (think what would happen if one of the arrays got sorted and the rest didn't).

Then, in your parser you can create objects for each record:

var records = new List&lt;Record&gt;();
var inputRecord = inFile.ReadLine();

while (inputRecord != null)
{
    var fields = inputRecord.Split(',');
    var currentRecord = new Record()
    {
        Age = int.Parse(fields[0]),
        Gender = fields[1],
        MaritalStatus = fields[2],
        District = int.Parse(fields[3])
    };

    records.Add(currentRecord);
    //...
}


You need to remember to dispose of  your FileStream and StreamReader if you are accessing them this way.  The easier and safer way to do this is with the using syntax, which will close and dispose of them at the ending braces.  I'd get into the habit of using this with any object with a .Dispose() method.

using (var fStream = new FileStream("test.txt", FileMode.Open, FileAccess.Read))
{
    using (var inFile = new StreamReader(fStream))
    {
        //Work with the file here
        //...
    } //inFile.Dispose() happens here automatically.
} //fStream.Dispose() happens here automatically.


This code...

    for (int x = 1; x &lt;= 22; x++)
        for (int y = 0; y &lt; districtData.Length; y++)
            if (districtData[y] == x)
                countDist[x]++;


...is begging for braces to make it easier to read.  It also help avoid potential errors.