hey,
i have written method to get the names of the employees from the database. how can i sort this to alphabetical order the code is below
C# Syntax
public String[] FillComboBox()
{
int NoOfRows;
String firstName;
String lastName;
db.openConnection();
DisplayLoginUserName();
String query = @"Select * From Employee;";
SqlCommand command = new SqlCommand(query, DB.getConnection());
SqlDataAdapter da = new SqlDataAdapter(command);
DataTable dt = new DataTable();
da.Fill(dt);
NoOfRows = dt.Rows.Count;
String[] fullName = new String[NoOfRows];
for (int i = 0; i < dt.Rows.Count; i++)
{
firstName = dt.Rows[i]["FirstName"].ToString();
lastName = dt.Rows[i]["LastName"].ToString();
fullName[i] = firstName + " " + lastName;
}
da.Dispose();
db.closeConnection();
return fullName;
}
hey help me
thanxxxxxxxxxxx