- Home /
How to sort an array ?
Hi, please give me the code for sorting an array() !!!
using UnityEngine; using System.Collections; public class Config: MonoBehaviour { public string[] lanarray = new string[6]; void Start(){ lanarray = new string[6]; lanarray[0]="English";lanarray[1]="German";lanarray[2]="French";lanarray[3]="Telugu";lanarray[4]="Tamil";
} } just i want to sort all the elements in lanarray()?
Answer by Eric5h5 · May 17, 2012 at 05:49 AM
Just use Array.Sort. I don't usually say things like this, but you could have found that out by taking 5 seconds to put "C# array sort" into Google.
thanks for ur reply, i tried with Sort, but it not solved.
Your answer
Follow this Question
Related Questions
get int based on 3 ints 0 Answers
Card arrangement 1 Answer
Sorting by multiple variables 3 Answers
Sorted assets when drag-and-drop into array? 0 Answers
Is there a way to load all objects in multiple folders within a Resource folder into 1 array? 1 Answer