generate the code for the game character's inventory sorting
string[] inventory = {"iron sword", "wood shield", "wood bow", "wood arrow", "potion", "potion", "potion"} void SortInventory(string[] inventory) { Array.Sort(inventory); } SortInventory(inventory); foreach(string item in inventory) { Console.WriteLine($"{item}"); }