Advertisement
2629881

Untitled

Jul 30th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.02 KB | None | 0 0
  1. namespace ekwipunek
  2. {
  3.     class Inventory
  4.     {
  5.         static string[] arrayItems = new string[6];
  6.          
  7.         public static void AddItem(string item)
  8.         {
  9.            
  10.         }
  11.  
  12.         public static void DisplayItem()
  13.         {
  14.             foreach (string item in arrayItems)
  15.                 if (item == null)
  16.                     Console.Write("Tempy;");
  17.                 else
  18.                 Console.Write(item + ";");
  19.         }
  20.        
  21.        
  22.     }
  23.  
  24.     class Program
  25.     {
  26.         static void Main(string[] args)
  27.         {
  28.             Console.WriteLine("Wpisz komende /add /switch /displayall");
  29.             string command = Console.ReadLine();
  30.            
  31.             switch (command)
  32.             {
  33.                 case "/displayall":
  34.                     Inventory.DisplayItem();
  35.                     break;
  36.                 case "/add":
  37.                     break;
  38.                 case "/switch":
  39.                     break;
  40.             }
  41.             Console.ReadKey();
  42.         }
  43.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement