Skip to content

Instantly share code, notes, and snippets.

View Regenhardt's full-sized avatar

Marlon Regenhardt Regenhardt

  • Softfair
  • Terra
View GitHub Profile
@Regenhardt
Regenhardt / Fluent Cast
Created May 22, 2018 15:27 — forked from lisardggY/Fluent Cast
For casting an object as part of a Fluent expression without having to put annoying parentheses around casting expressions.
public static T As<T>(this object objectToCast) where T : class
{
return objectToCast as T;
}