Click here to Skip to main content
15,891,136 members
Home / Discussions / C#
   

C#

 
AnswerRe: Process start problems Pin
Ennis Ray Lynch, Jr.30-May-08 7:57
Ennis Ray Lynch, Jr.30-May-08 7:57 
GeneralRe: Process start problems Pin
Xmen Real 30-May-08 8:00
professional Xmen Real 30-May-08 8:00 
QuestionPassing info from a thread Pin
brsecu30-May-08 5:21
brsecu30-May-08 5:21 
AnswerRe: Passing info from a thread Pin
Judah Gabriel Himango30-May-08 5:27
sponsorJudah Gabriel Himango30-May-08 5:27 
GeneralRe: Passing info from a thread Pin
Ennis Ray Lynch, Jr.30-May-08 6:04
Ennis Ray Lynch, Jr.30-May-08 6:04 
GeneralRe: Passing info from a thread Pin
Judah Gabriel Himango30-May-08 7:39
sponsorJudah Gabriel Himango30-May-08 7:39 
QuestionSortable List<t></t> Pin
eggsovereasy30-May-08 4:18
eggsovereasy30-May-08 4:18 
AnswerRe: Sortable List Pin
led mike30-May-08 4:46
led mike30-May-08 4:46 
I'm not sure what you are trying to do but List<> is already sortable

public class Employee
{
    public string FName;
    public string LName;
    public Employee(string fname, string lname) { FName = fname; LName = lname; }

    public static int CompareFirstName(Employee e1, Employee e2)
    { return e1.FName.CompareTo(e2.FName); }
    public static int CompareLastName(Employee e1, Employee e2)
    { return e1.LName.CompareTo(e2.LName); } 
}


List<Employee> list = new List<Employee>();
list.Add(new Employee("Joe", "Smakatelly"));
list.Add(new Employee("Sue", "Rummy"));

list.Sort(Employee.CompareFirstName);
Console.WriteLine("First Name");
foreach (Employee e in list)
    Console.WriteLine("{0} {1}", e.FName, e.LName);
list.Sort(Employee.CompareLastName);
foreach (Employee e in list)
    Console.WriteLine("{0} {1}", e.FName, e.LName);


led mike

QuestionImplement a Cyber Coffe in C# Pin
hendryck30-May-08 4:09
hendryck30-May-08 4:09 
AnswerRe: Implement a Cyber Coffe in C# Pin
Colin Angus Mackay30-May-08 4:22
Colin Angus Mackay30-May-08 4:22 
QuestionCoverflow/Shift window switching effect Pin
bDreea30-May-08 4:03
bDreea30-May-08 4:03 
QuestionHELP HELP URGENTLY!!!! Pin
Wajeeha30-May-08 2:55
Wajeeha30-May-08 2:55 
AnswerRe: HELP HELP URGENTLY!!!! Pin
Wajeeha30-May-08 3:09
Wajeeha30-May-08 3:09 
GeneralRe: HELP HELP URGENTLY!!!! Pin
subhankarbiswas30-May-08 9:00
subhankarbiswas30-May-08 9:00 
AnswerRe: HELP HELP URGENTLY!!!! PinPopular
Andy *M*30-May-08 3:17
Andy *M*30-May-08 3:17 
AnswerRe: HELP HELP URGENTLY!!!! PinPopular
Colin Angus Mackay30-May-08 3:25
Colin Angus Mackay30-May-08 3:25 
AnswerRe: HELP HELP URGENTLY!!!! PinPopular
Baconbutty30-May-08 3:37
Baconbutty30-May-08 3:37 
GeneralRe: HELP HELP URGENTLY!!!! Pin
eggsovereasy30-May-08 4:04
eggsovereasy30-May-08 4:04 
RantRe: HELP HELP URGENTLY!!!! Pin
blakey40430-May-08 4:27
blakey40430-May-08 4:27 
RantRe: HELP HELP URGENTLY!!!! Pin
blakey40430-May-08 4:27
blakey40430-May-08 4:27 
AnswerRe: HELP HELP URGENTLY!!!! Pin
Bert delaVega30-May-08 12:47
Bert delaVega30-May-08 12:47 
QuestionWorking with Decimals Pin
Jim Warburton30-May-08 2:47
Jim Warburton30-May-08 2:47 
AnswerRe: Working with Decimals Pin
Matthew Butler30-May-08 3:34
Matthew Butler30-May-08 3:34 
AnswerRe: Working with Decimals Pin
CPallini30-May-08 3:39
mveCPallini30-May-08 3:39 
GeneralRe: Working with Decimals Pin
Jim Warburton30-May-08 4:27
Jim Warburton30-May-08 4:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.