private IPort _getPort(byte portId) { for(int i = 0; i < _ports.Count; i++) { if (_ports[i].PortId == portId) return _ports[i]; } return null; }