Advertisement
2629881

Untitled

Jul 30th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.44 KB | None | 0 0
  1. public void AddItem(string item)
  2.         {
  3.             arrayItems[Array.IndexOf(arrayItems, null)] = item;
  4.             //for (int i = 0; i < arrayItems.Length; i++)
  5.             //{
  6.             //    if (arrayItems[i] == null)
  7.             //    {
  8.             //        arrayItems[i] = item;
  9.             //        break;
  10.             //    }
  11.             //}
  12.             Console.WriteLine("{0} has been added to your inventory", item);
  13.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement