S

S

  • NA
  • 381
  • 97.5k

Extension methods

Feb 28 2012 8:25 AM
Ive wrote a few Extension\Helper methods for converting data from a database into a business object of the same type.

For example I have AsId(); which converts\casts a string to an int.

However, when I come to bolt on one of my Extension methods I am unable to, I want AsId(); added like so

CustomerId = reader["CustomerId"].AsId();

But when I use try to access the method from intellisense it only gives me the common base types ie ToString() etc.

How can I get intellisense to pick up my set of Extension methods? ive seen it done before but cant work out how to do it...




Answers (5)