public void ChangeCropKind(int id) { CropInformation cropInfo; var isOk = CropInformationList.Crops.TryGetValue(id, out cropInfo); if (!isOk) { throw new Exception("not found the object with this id"); } this.id = info.Id; this.info = cropInfo; }
public void ChangeCropKind(CropInformation info) { this.id = info.Id; this.info = info; }