Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
4 views2 pages

Simple Bulleted List Control

Uploaded by

ssudhakaran538
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Simple Bulleted List Control

Uploaded by

ssudhakaran538
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

SIMPLE BULLETED LIST CONTROL

using System;
using System.Collections.Generic;
class program
{
static void Main()
{
List<string> items = new List<string>();
while (true)
{
Console.Clear();
Console.WriteLine("Simple Bulleted List APP");
Console.WriteLine("_________");
if (items.Count == 0)
Console.WriteLine("(No items yet)");
else
foreach (var item in items)
Console.WriteLine("." + item);
Console.WriteLine("\nOptions:");
Console.WriteLine("1. Add item:");
Console.WriteLine("2. Exit:");
Console.Write("choose an option:");
string input = Console.ReadLine();
if (input == "1")
{
Console.Write("Enter item to add:");
string newItem = Console.ReadLine();
if (!string.IsNullOrWhiteSpace(newItem))
items.Add(newItem.Trim());
}
else if (input == "2")
{
break;
}
}
}
}
OUTPUT :

You might also like