Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 / anubhav gupta

int[] arr = new int[4];
arr[0] = 22;
arr[1] = 33;
arr[2] = 11;
arr[3] = 44;
Array.Sort(arr);//First sort the array in accending
order
Array.Reverse(arr);//then do reverse of array for
descending order
foreach (int a in arr)
{
Response.Write(a+"--");
}

Is This Answer Correct ?    4 Yes 0 No

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

Answer / swapna

By calling Sort() and Reverse() methods we can sort the
elements in descending order.

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More C Sharp Interview Questions

How Is The Dll Hell Problem Solved In .net?

0 Answers   Siebel Systems,


What is protected internal modifier in C#?

0 Answers   Arigo Infotech,


What is asp net c# corner?

0 Answers  


Is int a struct in c#?

0 Answers  


What?s class SortedList underneath?

2 Answers  


Is c# queue thread safe?

0 Answers  


How do I edit a dll file?

0 Answers  


When To use HashTable In C#

0 Answers   Infosys,


What is lock statement in C#?

0 Answers   B-Ways TecnoSoft,


What is c# used for in the industry?

0 Answers  


Can you have an array of arrays?

0 Answers  


Is an interface a type c#?

0 Answers  


Categories