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

Assignment Help:

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#.

 


Related Discussions:- Accepting a list of 5 items - c# program

Full time contractual programming position, Project Description: This is...

Project Description: This is a full time contractual role seeking for a sports advisory service. We are data insights consultancy specializing in sports. We consult to a number

Difference between thread and process, What is the difference between threa...

What is the difference between thread and process? The thread is a path of execution which can run on CPU; a process is a collection of threads that share the same virtual memo

What is delegation, What is Delegation? A delegate seems like a strongl...

What is Delegation? A delegate seems like a strongly type function pointer. Delegates can request the methods that they reference without making explicit calls to those methods

Compute average of 3 numbers - c# program, Compute Average of 3 numbers - C...

Compute Average of 3 numbers - C# Program I didn't know the exact code for computing average of integer number. Can anybody suggest me the correct way for find out the average

What are the different implementations of linq, What are the different impl...

What are the different implementations of LINQ? The different implementations of LINQ are: LINQ to SQL - Refers to a component of.NET Framework version 3.5 that provides a

Difference between delete table and truncate table commands, What is the di...

What is the difference between DELETE TABLE and TRUNCATE TABLE commands? Following are differences between delete & truncate commands:- 1)The DELETE TABLE syntax logs the de

Define clr, The Full form of CLR is Common Language Runtime and it is  the ...

The Full form of CLR is Common Language Runtime and it is  the heart of the .NET framework. All Languages have its own runtime and its the responsibility of the runtime to take car

Enable asp.net polling, How to Enable ASP.NET polling? All our database...

How to Enable ASP.NET polling? All our database side is configured in order to get the SQL Cache working in the ASP.NET side we require to do some configuration in the web.conf

Gantt & pert charts.., help me to prepare the above charts for my online v...

help me to prepare the above charts for my online vegetable selling project

Seeking a senior extjs developer with strong net developing, Urgently seeki...

Urgently seeking a senior Extjs developer with strong NET developing skill Project Description: Urgently seeking a senior Extjs developer with strong NET developing skill

diana

2/12/2013 1:20:37 AM

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();

 }

}

Aana

2/12/2013 1:22:59 AM

Thanks for helping me in my assignment.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd