using System.Collections.Generic; namespace IcecreamView { public class EventArg { private List values; public EventArg(params object[] values) { if (values == null) { this.values = null; return; } this.values = new List(values); } public T GetValue(int index = 0) { if (this.values == null || index >= this.values.Count) { return default; } return (T)this.values[index]; } public bool IsNotNull(int index = 0) { return this.values.Count > index && this.values[index] != null; } public int Count => values.Count; } }