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 should you do is you want to remove an existing component but would like to make some funtionalities?

1480


Do I need to have the latest version of windows media player installed?

511


What are the parts of an http response?

494


What are sql notifications and sql invalidations?

527


Can more than one person use the same login?

570






What is the full form of asp.net?

529


Explain authorization levels in .net ?

604


Explain the updatepanel?

580


What is loop in asp.net?

582


Explain what are the advantages of asp.net mvc framework? : asp.net mvc

517


Hi this is the coding for adding data in to an xml table i want the coding for update and delete Try Dim emp_xml_doc As New XmlDocument If System.IO.File.Exists(Server.MapPath("emp.xml")) Then emp_xml_doc.Load(Server.MapPath("emp.xml")) Dim myrow_element As XmlElement myrow_element = emp_xml_doc.CreateElement("EmpDetails") Dim str As String str = "" & TxtEmpId.Text & "" & _ "" & TxtName.Text & "" & _ "" & TxtSalary.Text & "" myrow_element.InnerXml = str emp_xml_doc.DocumentElement.AppendChild(myrow_element) emp_xml_doc.Save(Server.MapPath("emp.xml")) Response.Write("Record Saved") Dim ds As New DataSet ds.ReadXml(Server.MapPath("emp.xml")) GridView1.DataSource = ds GridView1.DataBind() Else Response.Write("File does not exist.") End If Catch ex As Exception Response.Write(ex.ToString) End Try *********************** this is the xml file 100 xxx 2000 yyy dddd 77777 rrrr rrrr 6666 qaqa sini 50000 errrrrrrrr rrrrrrrrr 677777 rrr rrr 33

1729


How can we prepairing Interview

1884


What is mvc in asp.net interview question? : Asp.Net MVC

489


Which is better viewstate or session?

513


Where web.config file is used?

567