I'm trying to do something like this:
sObject.Custom_Field__c += myNumericVar;
But I'm using dynamic SOQL, so I can't hard-code the name of the fields. The following code works, but it's really verbose and hard to read. Is there a cleaner, easier-to-read way to do it?
sObject.put (fieldName, (Decimal) sObject.get(fieldName) + myNumericVar);