public bool getNonExistentProperty(Unit unit, string property) { try { return (unit.getProperties(property) == null); } catch (Exception) { return false; } }
public bool getNonExistentProperty(Unit unit, string property) { try { return (unit.getProperties(property) == null); } catch (NullReferenceException ex) { Console.WriteLine(ex.Message); return true; } }
public bool addExistingProperty(Unit unit, string property, object newValue) { try { unit.setProperties(property, newValue); unit.setProperties(property, newValue); return (unit.getProperties(property) == newValue); } catch (Exception) { return false; } }
public bool changeExistingPropertyValue(Unit unit, string property, object newValue) { unit.setProperties(property, newValue); return (unit.getProperties(property) == newValue); }
public bool setGetUnitSpecificProperty(Unit unit, string property, object value) { unit.setProperties(property, value); return (unit.getProperties(property) == value); }