How can you sort the elements of the array in descending
order?
Answers were Sorted based on User's Feedback
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 |
If I want to override a method one of class A and in class b then how do you declare?
What is the difference between string and stringbuilder in c#?
What is dataset and dataadapter in c#?
Why multiple Inheritence is not used in C#?
what are the Disadvantages of vb
How will you allow a class to be inherited, but prevent the method from being over-ridden?
What is a three-tier application.
Can we declare private class in c#?
What is thread and explain states of a thread in c#?
What is the difference between delegates and events in c#?
What is object type in c#?
What is view model in c#?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)