In the link above, the "as" keyword would work with (very close to) all of those lines and arguably more readable.