method service at a time"â„¢">
Search   Feed   Browse   Add
Feed items 1 - 1 of 1 for April 2005

Ray Jezek's Blog

"defying logic, one method service at a time"â„¢

How to return an array - null or empty - April 8, 2005

I was writing some code today and had a few methods that were returning arrays of values.  I was wondering what the guidelines were about the proper way to return an array from an API so I did a quick search and turned up the following: &8220;String and Array properties should never return a null reference. Null can be difficult to understand in this context. The general rule is that null, empty string (""), and empty (0 item) arrays should be treated the same way. Return an empty...
http://blogs.geekdojo.net/jez/archive/2005/04/08/7615.aspx
Available Archives
- January (2 items)
- February (1 item)
- March (1 item)
- April (1 item)
- July (2 items)
- December (2 items)
Sponsored Links
© 2008 FeedCapsule.com  |  Contact