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

Explain synchronous and asynchronous operations?

0 Answers  


write a program to find the biggest palindrome in the given string

0 Answers   Microsoft,


What is string interpolation in c#?

0 Answers  


What is javascriptserializer c#?

0 Answers  


What is the difference between firstordefault and first?

0 Answers  


What are the ways to deploy an assembly?

1 Answers  


What does dbml mean?

0 Answers  


how encapsulation is implemented in c#

0 Answers   Cognizant,


What is argument in c#?

0 Answers  


Give an example of a ctype.

0 Answers  


What is default constructor in c#?

0 Answers  


Explain the difference between proc. Sent by val and by sub?

0 Answers  


Categories