I have a function:
public static async Task DoSomthing(string str1, int num1, bool bool1)
{
//Do something.... (This function will not return any value)
}
I want to overload this function so it can be called with other arguments, but this function will basically call the function above.
Now I have 2 choices and I don't know what is the better one (in every aspect from performance to good coding)?
Option 1:
public static Task DoSomething(CustomObject obj)
{
return DoSomthing(obj.str, obj.num1, obj.bool1);
}
Option 2:
public static async Task DoSomething(CustomObject obj)
{
await DoSomthing(obj.str, obj.num1, obj.bool1);
}