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

If I want to override a method one of class A and in class b then how do you declare?

0 Answers  


What is the difference between string and stringbuilder in c#?

0 Answers  


What is dataset and dataadapter in c#?

0 Answers  


Why multiple Inheritence is not used in C#?

8 Answers   Symphony,


what are the Disadvantages of vb

0 Answers   Digital GlobalSoft,


How will you allow a class to be inherited, but prevent the method from being over-ridden?

0 Answers   Siebel,


What is a three-tier application.

0 Answers   Siebel,


Can we declare private class in c#?

0 Answers  


What is thread and explain states of a thread in c#?

0 Answers  


What is the difference between delegates and events in c#?

0 Answers  


What is object type in c#?

0 Answers  


What is view model in c#?

0 Answers  


Categories