How can u sort strings in array where strings are passed to
method as arguments.

Answer Posted / yasodha

in c#.net

using system;
namespace new;
public class sorting
{
string [] str= new string[25];
public string ssort(params string []str)
{
array.sort(str);
foreach(string i in str)
{
console.writeline("The sort string is:{0}",i);
}
}
public class mainsort
{
sorting st=new sorting();
st.ssort("viji","anu","priya","baskar");
console.readline();
}

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between session.abandon() vs clear()?

726


What is application variable?

701


How do we sort the data from a dataset?

752


I am trying to implement sorting facility from client side code in GridView Control. So how can I fill up an Array inside client side code (using JavaScript), i want to assign my DataSet object declared and filled up on Server side(in code behind) to the array (on client side)

1715


What is the main differences between asp and asp.net?

730


How to disable validator control by client side JavaScript?

748


What is authentication in asp.net?

776


What is session state server?

847


What a diffgram is, and a good use for one?

748


Define cookie.

748


Why SessionID changes in every request in asp.net?

745


How do I open an ashx file in windows 7?

762


What is asp net objects?

706


How can you handle exceptions in asp.net?

749


What is custom events?

771