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 |
Why we use delegates in c#?
What is the namespcae generally given to the webpage of the .NET Framework ?
Explain About Global.asax
What is the purpose of c#?
What are partial types in c#?
Is null c# operator?
How to add controls dynamically to the form using c#.net.
Explain concurrency with aop?
What is the wildcard character in SQL? Let?s say you want to query database with LIKE for all employees whose name starts with La.
What is the syntax for calling an overloaded constructor within a constructor?
Can we declare class as protected?
Can we have multiple threads in one app domain?