This post originated from an RSS feed registered with .NET Buzz
by Jeff Key.
Original Post: Where is the line between a property and a method?
Feed Title: Jeff Key
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/jkey/Rss.aspx
Feed Description: Topics revolve around .NET and the Windows platform.
Brad Abrams has started some really interesting API discussions over the past couple months. It's great to see what the .NET teams are thinking about and it's nice to know they're listening to “the people“. I've always found API issues to be particularly interesting, and Brad's blog doesn't disappoint.
One of the more recent discussions is Properties vs. Methods. Sure, they're both really methods, but what does the consuming developer expect? Most treat them like fields and expect that the cost is minimal. What if that's the case 95% of the time, but the remaining 5% are (very) expensive? Do you use methods instead? Do you consider a different design altogether? Read about this and more at Brad's Pad of API Happiness.