I want to understand why the Expression<Func<SomeObject, bool>>
filter needs to be passed by reference.
This is an object and should by default be passed by ref in c#.
Expression<Func<SomeObject,bool>> filter = PredicateBuilder.New<SomeObject>(true);
//Function that builds the filter
void buildFilter(ref Expression<Func<SomeObject, bool>> filter){
filter = filter.And(x => x.SomeProperty == sth);
...builds filter. }
what this is and why we need to handle it like this?