what is the best approach to pass information to a function? should we pass a list of parameters? or we should create a class and just pass the instance of that class, so that whenever, there's a change in the parameter list we don't have to change all the flow?
Passing the class variable:
public class FooParams
{
string Name{get;set;}
string Password{get;set;}
}
public void GetFoo(Foo foo)
{
}
Passing a list of parameters
public void GetFoo(string name, string password)
{
}