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

Disable Session State at the Page Level

1 Answers  


Explain how is the asp.net mvc architecture different from others? : asp.net mvc

0 Answers  


Differentiate an ADO.NET Dataset and an ADO Recordset with its functionality?

3 Answers   Siebel,


Why asp.net mvc is better than asp.net? : Asp.Net MVC

0 Answers  


What is recordset asp?

0 Answers  






How can we use Web API with ASP.NET Web Form?

0 Answers  


Can we use MSSql as backend in asp.net...if yes then How.?

0 Answers   MCN Solutions,


Explain the different types of directives in .net?

0 Answers  


What are session state modes in asp.net?

0 Answers  


“~” means in asp.net application?

4 Answers   IBS,


what is session,cokkies in asp.net??

5 Answers  


What is the difference between web.config and machine.config in ASP.NET?

0 Answers   Amazon,


Categories