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

What the use of Form Authentication and windows Authentication?

1 Answers   NetCity, TCS,


version information of assembly consist of _________ values.

3 Answers   AG Technologies,


How does Garbage collector(GC) works in .net

14 Answers   Accenture, HCL, Kekran Mekran, People Tech, Wipro,


What is the used of "ispostback" property?

0 Answers  


Where the cookie value is stored?

0 Answers  


Difference b/w casting and boxing?

5 Answers   IBS,


what is postback implementation?when pre-render event n init event is fired?

2 Answers   Ness Technologies,


What is the equivalent of date() and time() in asp.net?

0 Answers  


Whats an assembly

2 Answers   IBM,


What is the life cycle of an asp.net page?

0 Answers  


What is masterpage?

0 Answers  


Explain one critical mapping?

0 Answers  


Categories