Sunday, July 12, 2009

Visual studio c sharp help?

Program shall ask the user to enter 5 names.


• Program shall prints out the 5 names.


• Program shall sort the names.


• Program shall print out the sorted names.


• Program should use the ArrayList class.


• Program should be written in C#.





i need to create this program


and a few other programs as well


i am new to c sharp coding and need a lot of help


can someone please help me with this


i need help really badly


and i promise i will do the rest of the programs on my own if i get help in this one

Visual studio c sharp help?
I make the progran for you in a windows form and in a console


you may download it from





http://www.geocities.com/uribanabreak/ji...





the code is it








using System;


using System.Collections.Generic;


using System.Text;





namespace jijoconsole


{


class Program


{








public void loadnames()


{


int x;


System.Console.Write("Write five names\n");


for (x = 1; x %26lt; 6; x++)


{


System.Console.Write("NAME " + x + "\n");


ar.Add((object)System.Console.ReadLine()...


}





}


public void printnames()


{


int j;


object[] a;


a = ar.ToArray();


for (j = 0; j %26lt; a.Length; j++)


{


System.Console.Write(a[j].ToString() + "\n");


}





}





static void Main(string[] args)


{


int i = 0;


Program yahoo = new Program();


yahoo.loadnames();


System.Console.Clear();


while (i != 3)


{





System.Console.Write("1.- PRINT THE NAMES\n");


System.Console.Write("2.- SORT THE NAMES\n");


System.Console.Write("3.- EXIT PROGRAM\n");


i = System.Convert.ToInt32(System.Console.Re...


if (i == 1)


{


yahoo.printnames();


System.Console.Write("Press any key");


System.Console.ReadLine();


System.Console.Clear();


}


else if (i == 2)


{


yahoo.ar.Sort();


System.Console.Write("List sorted, press any key");


System.Console.ReadLine();


System.Console.Clear();


}


}


}


//put the object array list


System.Collections.ArrayList ar = new System.Collections.ArrayList();


}


}
Reply:When you start visual c#, on the left there is a link to learn vb.


It is even offline!


No comments:

Post a Comment