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

Answers were Sorted based on User's Feedback



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

Answer / ratnesh

String[] s={"hdf","sdfer","fdf","astrf"};
Array arr = new Array(s);
arr.Sort();

Is This Answer Correct ?    38 Yes 4 No

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

Answer / 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

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

Answer / shaukat

String[] s={"hdf","sdfer","fdf","astrf"};
Array.Sort();

Is This Answer Correct ?    9 Yes 6 No

Post New Answer

More ASP.NET Interview Questions

when the user control event occur in ASp page life cycle?

3 Answers   Microsoft,


How do cookies work? Give an example of their abuse.

0 Answers  


What is a 401 redirect?

0 Answers  


How will create assesblies at run time?

0 Answers  


What is the significance of attaching a profile while creating a user?

0 Answers   MCN Solutions,






best .net institute in hyderabad

7 Answers  


What is OSI layer? Explain different layers.

0 Answers   MCN Solutions,


How to identify host of my system? How to identify servername of my system? How to identify domainname of my system?

2 Answers  


What is State Management in .Net and how many ways are there to maintain a state in .Net?

6 Answers  


In order to get assembly info which namespace we should import?

0 Answers  


What is asp net application object?

0 Answers  


What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?

1 Answers   Infosys, KPIT,


Categories