Casting types inline - C#