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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is array ienumerable c#?

471


What is the .NET collection class that allows an element to be accessed using a unique key?

606


Which is faster hashtable or dictionary?

505


What is global namespace in c#?

490


How many constructor can a class have?

475






Where is the main method in c#?

532


What are the types of class in c#?

503


what happens if you inherit multiple interfaces and they have conflicting method names?

496


What are the types in c#?

507


What are custom attributes in c#?

501


What are annotations in c#?

527


Why linq is having select clause at the end?

535


What is using keyword in C#?

572


What is the difference between final finally and finalize in c#?

453


What is the difference between and xml documentation tag?

523