How can u sort strings in array where strings are passed to
method as arguments.
Answers were Sorted based on User's Feedback
Answer / ratnesh
String[] s={"hdf","sdfer","fdf","astrf"};
Array arr = new Array(s);
arr.Sort();
Is This Answer Correct ? | 38 Yes | 4 No |
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 |
Answer / shaukat
String[] s={"hdf","sdfer","fdf","astrf"};
Array.Sort();
Is This Answer Correct ? | 9 Yes | 6 No |
What the use of Form Authentication and windows Authentication?
version information of assembly consist of _________ values.
How does Garbage collector(GC) works in .net
14 Answers Accenture, HCL, Kekran Mekran, People Tech, Wipro,
What is the used of "ispostback" property?
Where the cookie value is stored?
Difference b/w casting and boxing?
what is postback implementation?when pre-render event n init event is fired?
What is the equivalent of date() and time() in asp.net?
Whats an assembly
What is the life cycle of an asp.net page?
What is masterpage?
Explain one critical mapping?