Change the name of the method, for example
string Get(string url, Guid id, bool logResponse) Tuple<string, int> GetWithStatus(string url, Guid id, bool logResponse)
The main goal of programming is not to distinguish the compiler from the differences, but to tell the difference to the developers who will read your code. Other parameters are return status as an out parameter:
string Get(string url, Guid id, bool logResponse, out int status)
I really don't like the out parameters, but I like the tuples even less - what will the name Item2 developer who uses your method? Is this the status, or the number of attempts, or the length of the response? Neither the method name nor the return type can say what it is.
So, even for the first case with the renamed method, I also changed the return type to something like
public class ServerResponse { public string Content { get; set; } public HttpStatusCode Status { get; set; }
source share