Accepting a list of 5 items - c# program, DOT NET Programming

Accepting a List of 5 Items - C# Program

Hello, I've been trying so many codes for this but those codes didn't work well. Please write the code for Accepting a List of 5 Items in c#.

 

Posted Date: 2/12/2013 1:17:44 AM | Location : United States





Program code for Accepting a List of 5 Items, implement it

using System;

using System.Collections;  

class ShoppingList

{

  public static void Main(string []args)

 {

  ArrayList n = new ArrayList ();

  n.Add(args[0]);

  n.Add(args[1]);

  n.Add(args[2]);

  n.Add(args[3]);

  n.Add(args[4]);  

  n.Sort();

  Console.WriteLine ("The items in the Shopping List are : ");  

  for (int i =0; i< nCount; i++)

  {

  Console.WriteLine((i+1) + " " +n[i]);

  }

  Console.WriteLine();  

  n.Remove(2); // Deletes an item frm list

  n.Add(3) = "Daljit"; // Adds an item in the list

  n.Add(5) = "End"; // Adds in the end of the list    

  Console.WriteLine ("The items in the Shopping List After modifying are : ");  

   for (int i =0; i< nCount; i++)

  {

   Console.WriteLine((i+1) + " " +n[i]);

  }  

  Console.ReadLine();

 }

}

Posted by diana | Posted Date: 2/12/2013 1:20:37 AM

Thanks for helping me in my assignment.

Posted by Aana | Posted Date: 2/12/2013 1:22:59 AM


Related Discussions:- Accepting a list of 5 items - c# program, Assignment Help, Ask Question on Accepting a list of 5 items - c# program, Get Answer, Expert's Help, Accepting a list of 5 items - c# program Discussions

Write discussion on Accepting a list of 5 items - c# program
Your posts are moderated
Related Questions
ASP.NET 2.0 application port to ASP.NET MVC Project Description: Legacy ASP.NET application for managing tasks for a private client needs a complete re-write. The applicat

Project Description: The software is developed to help individuals train both their subconscious and conscious mind so they can improve their life and get more success. - How

I need Export Data using JSON Project Description: We could like to share our data with other websites via JSON. We are presently using Entity Framework with MySQL. We req

This assignment requires you to design, develop and implement a token web application. It is intended to assess your mastery of the web application development concepts and ASP.NET

Could you please explain to me the different types of DOT NET programming

Project Description: I require a flight scheduling website, including billing and basic aircraft management; this will be used by a local piloting school There is no requirin

Project Description: I need to unlock software or make a similar kind of software. It is presently installed in my PC and I will provide you installation files if needed. It wil

Project Description: Section - Mobile Data Collection System Using the Microsoft Mobile .Net Framework or .Net Compact Framework and ASP.NET web technology develop a mobile d

What do you mean by data encapsulation? Data encapsulation is a method of binding data and code in single unit known as object and hiding all the implementation details of a cl

Net project Project Description: We want to make .net project Microsoft Active Directory, PMS Lync 2010 - 2013 databases creating a license key for their SW generati