How to make an expression as short as possible
To any min maxxers out there, i am trying to shrink these few lines to inhuman extremes for.. no reason really. GetEffectsOfType(uint type, int baseValue) returns the total value of effects of type "type" or null if it finds none. I want "value" to remain null if there were no effects found in the entire foreach, otherwise it has to have the total value. This code works, i was just thinking if there was a way to go smaller, maybe making more use of the null coalition operator ??.
