Question: Suppose I have an object that looks like this:

```
public class SomeObjectModel
{
   long TheLong {get; set;}
   public string TheString {get; set;}
}

```

At some point in my code, I pass some of the properties of this object into a function:

```
public void SomeFunction(long LongParameter, string StringParameter) { ... }

```

What's the difference, if any, between passing in parameters like this versus refactoring the function to take in SomeObjectModel directly like this:

```
public void SomeFunction(SomeObjectModel TheObject)
{
    long LongParameter = TheObject.TheLong;
    string StringParameter = TheObject.TheString;
}

```

Is there's a difference between the two approaches? Is there a recommended approach?

Answer: 
In the latter case (passing the whole object), your call stack will only have one reference, thus be smaller, thus in theory faster. In the earlier case, each parameter needs to be put on a stack, and with lots of parameters, more needs to be put on the stack, and thus in theory slower.

The latter case also allows you to modify the object itself, where as passing by parameters object cannot be modified. Also, should ever need to change and pass additional value, you'll need to change function signature in the earlier case, where as leave untouch in the latter case.
The difference is in extensibility. Adding model properties doens't lead to modifying method signature.