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 a interface in c#?

0 Answers  


what is the real use of interface in c#,other than that multiple inheritance is not possible

7 Answers  


What is dataview c#?

0 Answers  


List the differences between method overriding and method overloading?

0 Answers  


What is inner class in c#?

0 Answers  






Are multiple data types stored in System.Array?

0 Answers   Siebel,


What is the use of dll file in c#?

0 Answers  


What happens during the process of boxing?

0 Answers  


How is method overriding different from overloading?

0 Answers  


Which is faster dictionary or hashtable?

0 Answers  


Explain data types in c#?

0 Answers  


Explain the process of Serialization?

0 Answers  


Categories