private void CheckChannelId(int ChannelId) { if (ChannelId < 0 || ChannelId >= Channels.Length) { throw(new InvalidChannelException()); } }