Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace List_Demo
- {
- class Program
- {
- static void Main()
- {
- List<string> products = new List<string>();
- products.Add("cheese");
- products.Add("olive oil");
- products.Add("drink");
- products.Add("cucumber");
- products[0] = "mutsarela";
- products.Add("peppers");
- products.RemoveAt(2);
- products.Insert(0, "olives");
- Console.WriteLine(string.Join(", ",products));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment