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 an array of arrays called?

0 Answers  


which datatype i have to use we i need dynamic size.for eg. empname .in first row it have only five chars.but next row it have 100 chars.

3 Answers  


write a program to find the biggest palindrome in the given string

0 Answers   Microsoft,


How many bytes is a char c#?

0 Answers  


What are the properties of a string class?

0 Answers  


What is the use of expression tree in c#?

0 Answers  


Explain the use of Mutex in C#?

0 Answers   Sans Pareil IT Services,


WHAT IS THE EXACT USE OF INTERFACE(DONT TELL USE FOR MULTIPLE INHERITANCE)

5 Answers   eXensys,


What is tpl in c#?

0 Answers  


What is helper method in c#?

0 Answers  


Can a class or a struct have multiple constructors?

0 Answers  


what is the difference between int and Int32?

5 Answers   TCS,


Categories