Advertisement
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 ConsoleApp7
- {
- class Note
- {
- List<User> userID;
- public Note ()
- {
- userID = new List<User>();
- }
- public void AddUser(User another)
- {
- userID.Add(another);
- }
- public void List()
- {
- userID.ForEach(a =>
- {
- Console.WriteLine(a);
- });
- }
- }
- class Book
- {
- List<Note> note;
- string bookID;
- public void AddNote(Note another)
- {
- note.Add(another);
- }
- public void ShowAllNotes()
- {
- note.ForEach(a =>
- {
- Console.WriteLine(a);
- });
- }
- }
- class User
- {
- string ID;
- string password;
- public User (string ID, string password)
- {
- this.ID = ID;
- this.password = password;
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- string stop = null;
- Note one = new Note();
- while (stop != "Stop")
- {
- Console.WriteLine("Введите ваш ник и пароль:");
- string userName = Console.ReadLine();
- string userPassword = Console.ReadLine();
- User o = new User(userName, userPassword);
- one.AddUser(o);
- stop = Console.ReadLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement