HaoAsakura

Untitled

Sep 25th, 2023
885
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.88 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Security.Cryptography;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace TestFieldIthink
  9. {
  10.     struct Storage
  11.     {
  12.         public string Name;
  13.         public int Size;
  14.         public List<string> items;
  15.  
  16.         private void ShowContent()
  17.         {
  18.             Console.WriteLine("\n[*] Склад содержит следующие предметы: ");
  19.            
  20.             for (int i = 0; i < items.Count; i++)
  21.                 Console.Write(items[i] + ", ");
  22.         }
  23.  
  24.         public void Add(string item)
  25.         {
  26.             items.Add(item);
  27.             ShowContent();
  28.         }
  29.  
  30.         public void Delete()
  31.         {
  32.            
  33.         }
  34.  
  35.     }
  36.  
  37.     internal class Program
  38.     {
  39.         static void Main(string[] args)
  40.         {
  41.  
  42.         }
  43.     }
  44. }
  45.  
Advertisement
Add Comment
Please, Sign In to add comment