Answer to Question #288878 in C# for Chitti

Question #288878

You need to maintain a contact list in a generic list collection. You need time perform the following tasks i- add contact () - To add contact details to list





1
Expert's answer
2022-01-19T14:26:57-0500
using System;
using System.Threading;

namespace Contact
{
    internal class Program
    {
        public static void Main(string[] args)
        {
            string[] names = new string[20];
            string[] numbers = new string[20];
            string[] email = new string[20];
            string[] state = new string[20];
            for (int i = 0; i < 100; i++)
            {
                Console.Write($"Name of contact {i+1}: ");
                names[i] = Console.ReadLine();
                Console.Write($"Mobile number of a {i+1} contact: ");
                numbers[i] = Console.ReadLine();
                Console.Write($"Email of a {i+1} contact: ");
                email[i] = Console.ReadLine();
                Console.Write($"State of a {i+1} contact: ");
                state[i] = Console.ReadLine();
                Console.WriteLine($"\nName: {names[i]}");
                Console.WriteLine($"Mobile number: {numbers[i]}");
                Console.WriteLine($"Email: {email[i]}");
                Console.WriteLine($"State: {state[i]}\n");
                Thread.Sleep(1000);
            }
        }
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS