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

What is the difference between var and dynamic types in c# 4.0?

506


Explain the difference between Response.Write () and Response.Output.Write ().

525


What are the boolean data types in c#?

505


What is a method signature c#?

511


Explain about Oops concept

544






What are "class access modifiers" in C#?

531


How main method is called in c#?

505


What is use of singleton class in c#?

490


What is mean by c#?

477


What is the c# equivalent of c++ catch (...), Which was a catch-all statement for any possible exception?

491


What is the meaning of extention?

479


What is the purpose of dictionary in c#?

453


What is a delegate in c#?

504


How much time will it take to learn unity?

465


What is the difference between system.string and system.text.stringbuilder classes?

514