Move cast to be a member method to remove awkward syntax

Add in select extension to support fluent linq
Add some preprocessor literals for net versions