How do you sort a list in c#?



How do you sort a list in c#?..

Answer / Varun Singh Yadav

"You can sort a list in C# using the Sort() or OrderBy() methods. The Sort() method sorts a list in ascending order, while OrderBy() allows you to specify whether the sorting should be ascending (default) or descending."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

How can we insert 100 records @ a time without using for loop into the databse

10 Answers   IBM,


What is the diff between System.String and System.Text.StringBuilder classes?

1 Answers   Siebel,


What is the difference between dynamic type variables and object type variables in c#?

1 Answers  


Why c# is type safe?

1 Answers  


To catch any possible exception What is the C# syntax written ?

1 Answers   Siebel,


Is null empty or whitespace c#?

1 Answers  


Explain About Assembly in .NET, types of assemblies, their difference, How to register into GAC. How to generate the strong names & its use.

1 Answers  


Which are the loop types available in c#?

1 Answers  


Can you describe iuknown interface in short?

1 Answers  


Why constructor is used in c#?

1 Answers  


Can we have 2 main methods in c#?

1 Answers  


What is the difference between static class and singleton class in c#?

1 Answers  


Categories