How can you sort the elements of the array in descending order?

Answers were Sorted based on User's Feedback



How can you sort the elements of the array in descending order?..

Answer / guest

By calling Sort() and then Reverse() methods

Is This Answer Correct ?    15 Yes 0 No

How can you sort the elements of the array in descending order?..

Answer / neoupadhyay

int[] arr = new int[3];
arr(0) = 3;
arr(1) = 5;
arr(2) = 1;

Array.Sort();
Array.Reverse();

Is This Answer Correct ?    10 Yes 2 No

How can you sort the elements of the array in descending order?..

Answer / rambabu

By calling Sort() and then Reverse() methods.

Is This Answer Correct ?    1 Yes 0 No

How can you sort the elements of the array in descending order?..

Answer / payal mehta

We can use Sort property for that.A string that contains
the column name followed by "ASC" (ascending) or "DESC"
(descending). Columns are sorted ascending by default.

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More C Sharp Interview Questions

What is the difference between CreateObject() and GetObject()?

0 Answers   CGI,


What is yield break in c#?

0 Answers  


Can hashtable have duplicate keys in c#?

0 Answers  


What is serialization and deserialization in c# with example?

0 Answers  


What are partial classes and use of partial classes?

0 Answers   QuestPond,


What are examples of desktop applications?

0 Answers  


Explain the clr triggers?

0 Answers  


What is dependency injection in simple words?

0 Answers  


What are the types of serialization?

0 Answers  


How do you implement multiple inheritance in .NET?

10 Answers   Microsoft,


What is a decimal in c#?

0 Answers  


Explain the difference between and xml documentation tag?

0 Answers  


Categories