Using Type T for making C# Method Calls More Flexible

Posted by: peterkellner.net, on 06 May 2016 | View original | Bookmarked: 0 time(s)

I often find myself getting lazy and making multiple entry points for a method when I really should spend an extra 30 seconds and use the Type T pattern in C#.  Below are the two calls I had and when I started writing the one that returns int, I decided enough was enough.private static bool [...]

Category: C# | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 330 | Hits: 47

Similar Posts

  • VS 2010 Code Intellisense Improvements (VS 2010 and .NET 4.0 Series) more
  • Dynamic in C# 4.0: Creating Wrappers with DynamicObject more
  • Fun with C# 4.0s dynamic more
  • Take Two: A jQuery WCF/ASMX ServiceProxy Client more
  • Fun With Method Missing and C# 4 more
  • Exception Handling Advice for ASP.NET Web Applications more
  • Improved type safety when dealing with generic types, generic methods and reflection more
  • Business Apps Example for Silverlight 3 RTM and .NET RIA Services July Update: Part 6: Data Transfer Objects (DTOs) more
  • An Overview of Partial Classes and Partial Methods more
  • AJAX Logging with Exponential Backoff more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD