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 manifest in .net framework?

535


What does clearing cache?

530


What is asp.net? How is it different from asp?

539


How will you load dynamic assembly? How will create assesblies at run time?

455


What is the difference between union and structure?

498






How is my content secured from unauthorized access?

513


Explain the difference between the web config and machine config.

620


What is the difference between c# and .net?

573


How to make sure that contents of an updatepanel update only when a partial postback takes place (and not on a full postback)?

520


Is asp.net outdated?

524


What is connection pooling and how to enable and disable connection pooling?

475


How can we inherit a static variable?

537


What is Web API?

642


Can you explain why it is useful to use mvc instead of webforms? : asp.net mvc

532


What is difference between datalist and gridview?

573