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 are methods in C#?

708


Why we use delegates in c#?

677


Suppose you have already existing application with Visual Studio 6 (VB 6, InterDev 6) and this application utilizes Windows 2000 COM+ transaction services. With this example how can you approach migrating this application to .NET?

683


What is callback in c#?

651


What is sqldatareader c#?

658


How we can create an array with non-default values?

709


How do I do implement a trace?

758


What is a nullreferenceexception?

732


How many types of constructors are there in c#?

635


Is c# pass by reference?

684


What is meant by enumerable in c#?

688


What is a class level variable in c#?

705


Why is lazy loading?

664


What is generic collection in c#?

667


List the 5 different access modifiers in c#?

686