basically I\'m building a very generic T4 template and one of the things I need it to do is say print variable.ToString(). However, I want it to evaluate lists and
variable.ToString()
Since C# 7.0 you can also achieve this so:
if (variable is IEnumerable enumVar) { foreach (var e in enumVar) { ... } }