Sort list game objects based on name

I have created list of game objects those represent tile for my game. Based on game play dynamically tiles added or removed from list.
I have created tile list using following code so that you can understand which class I have used to manage list.

private List<GameObject> tileList = new List<GameObject>();

Now I want to retrieve all tiles but in sorted order based on name. I have given game objectname in following manner tile01, tile02, tile03, … etc.

Please give some help for this.

Using your example:

using System.Linq;
using System.Collections.Generic;

public class MyClass
{
  private List<GameObject> tileList = new List<GameObject>();

  public void Start()
  {
    tileList = tileList.OrderBy(tile => tile.Name).ToList(); // done
    // or the other way
    //tileList = tileList.OrderByDescending(tile => tile.Name).ToList(); // done
  }
}

Providing you have;

using System.Linq;

in your using declarations, then you could use this;

var orderedByName = tileList.OrderBy(p => p.name);

Okay this is the way:

// we are using the LINQ sytem:
using System.Linq;

// create a list of gameObejcts, the objects must have a tag in the inspector

public List myList= new List();
// In the moment we Add the objects to the list we must .OrderBy name like below

myList.AddRange(GameObject.FindGameObjectsWithTag("theTAGofObject").OrderBy( go => go.name));

//HOPE THIS HELP SOMEONE