Converting Tuple to Class in method return values and other places
I often will create a class that returns a small tuple, maybe (IEnumerable<Data> Rows, int TotalRows)
and I find this OK
But then after a while I might want to extend it a bit, eg (IEnumerable<Data> Rows, int TotalRows, double TimeTakenInSecs)
and at about this point, especially if its to be reused in several places (even just a few methods) then I'd like to convert it to a class/struct.
Tuples have become more important since async task methods cannot have out params.
But, I cant find any way to do this in R#, and that really surprises me, so I fear I must be missing something
Please sign in to leave a comment.
Hello David Roberts, thank you for your question. Unfortunately, such a feature is not yet available in ReSharper. There is the following feature request about it in our tracker: CA to convert Tuple<T1,T2,...TN> to named type. Please comment or vote on it to receive notifications about status changes.