<p>I am reading a .csv file and returning its lines in string array. One of the members is manufacturer, for which I have Toyota, Ford, etc.</p>

<p>I want to sort an array (Can be another collection) of the rows, by the value in manufacturer and alphabetical order.</p>

<p>So I'd have:</p>

<pre><code>28437 Ford Fiesta
328   Honda Civic
34949 Toyota Yaris
</code></pre>

<p>and so forth...</p>

<p>What would be the best way to do this using C# and no database? I say no database because I could insert the csv into a table in a sql server database, and then query it and return the data. But this data is going into a html table built on the fly, which would make the database approach a little long winded.</p>

What version of .NET are you using? If you're using 3.5 - or can use C# 3.0 and
LINQBridge
- then I'd definitely go with LINQ. First transform each line into some appropriate object, and then use OrderBy:
```
```
var cars = lines.Select(line => Car.ParseLine(line))
                .OrderBy(car => car.Manufacturer);
```
```