static void Main(string[] args) { var toll = new Sharpie("Blue", 0.1, 100); string mystring = "o legyen ar vege bazdmeg!"; toll.use(mystring); Console.WriteLine(toll.InkAmt); Console.Read(); }
static void Main(string[] args) { SharpieSet mySharpies = new SharpieSet(); Sharpie first = new Sharpie("red", 0.1, 100); Sharpie second = new Sharpie("blue", 0.2, 0); mySharpies.Sharpielist.Add(first); mySharpies.Sharpielist.Add(second); Console.WriteLine(mySharpies.CountUsable()); Console.WriteLine(mySharpies.Sharpielist[1].InkAmt); mySharpies.RemoveEmpty(); foreach (var item in mySharpies.Sharpielist) { Console.WriteLine(item.InkAmt); } Console.Read(); }