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: 
Beside other differences In the first approach if the *parameter* values are changed the value in the calling method will remain the same but in second case they will change.

If you pass object and later add new properties in the *object* your consuming call will still be able to call the method but for *parameters* you will have to changed the calling class as well.
You might want to ask yourself if you'd ever use that method when you do not have, or do not want to create, a SomeObjectModel instance.

You might also ask yourself if the method should be a member of SomeObjectModel, and therefore you wouldn't need to explicitly pass it anything.

This could be considered a very open-ended question and I think others have sufficiently answered it, so I'll stop here. I just wanted to point out that there are a lot of other things to consider when you design that method.