Write a small program that uses the Sort() method to sort an array of names into alphabetical order.
What will be an ideal response?
using System;
class SortArray
{
static void Main()
{
string[] names = {"Olive", "Patty", "Richard", "Ned", "Mindy"};
int x;
Array.Sort(names);
for(x = 0; x < names.Length; ++x)
WriteLine(names[x]);
}
}
You might also like to view...
Which of the following is not true when inserting, sizing, and positioning shapes?
a. Shapes include lines, arrows, stars, banners, ovals, rectangles, and other basic shapes you can use to illustrate an idea, a process, or a workflow. b. To use, click the Insert tab, and then in the Drawings group, click the Shapes button to display the Shapes gallery. c. Shapes can serve as a container for text. d. Shapes can be sized and moved using the same techniques that you use to size and move clip art images.
Files that have an extension of .odp were created using ________
A) Impress B) Writer C) Calc D) Base