Click here to Skip to main content

Design and Architecture

    RSS: RSS Feed

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page  Show 
  Refresh
GeneralRe: Does a developer need local administrator rights? PinmemberIan Shlasko4:32 17 Nov '09  
AnswerRe: Does a developer need local administrator rights? PinmemberMREcoolio8:50 19 Nov '09  
AnswerRe: Does a developer need local administrator rights? [modified] PinmemberFlint-Bear6:14 8 Dec '09  
QuestionEmpty IEnumerable or null PinmemberGideon Engelberth10:19 10 Nov '09  
AnswerRe: Empty IEnumerable or null PinmvpLuc Pattyn14:36 10 Nov '09  
GeneralRe: Empty IEnumerable or null PinmemberGideon Engelberth6:21 16 Nov '09  
AnswerRe: Empty IEnumerable or null PinmemberDavid Skelly23:47 10 Nov '09  
I would return an empty enumerable from NextVersions. That way, the consumer of this property does not have to include a test for whether the IEnumerable is Nothing, but can just go ahead use it. If it's empty, then the iteration over the enumerator will simply do nothing. That makes life simpler for the person using your VersionedDataObject and takes away the risk of getting a NullReferenceException when someone forgets to check for Nothing. So, you can just do something like:
For Each version In myVersionedObject.NextVersions
    ' do something with version
Next

GeneralRe: Empty IEnumerable or null PinmemberGideon Engelberth6:22 16 Nov '09  
QuestionRun to Completion PinmemberLeslie Sanford14:51 4 Nov '09  
QuestionWindows Service PinmemberRajeevBhatt23:13 27 Oct '09  
AnswerRe: Windows Service PinmemberCovean0:07 28 Oct '09  
AnswerRe: Windows Service PinmemberMREcoolio9:01 19 Nov '09  
AnswerRe: Windows Service Pinmemberpuri keemti1:39 7 Dec '09  
QuestionUsing MSMQ along with BizTalk PinmemberMember 188237810:18 27 Oct '09  
AnswerRe: Using MSMQ along with BizTalk PinmemberMember 18823780:55 28 Oct '09  
QuestionFinancial Software Designs Pinmembermotapa9:36 21 Oct '09  
AnswerRe: Financial Software Designs PinmemberEddy Vluggen5:18 30 Oct '09  
AnswerRe: Financial Software Designs Pinmemberpuri keemti1:41 7 Dec '09  
QuestionOpinion survey about ORM / DAL tools Pinmembermidix0:44 21 Oct '09  
AnswerRe: Opinion survey about ORM / DAL tools Pinmembermidix9:40 9 Nov '09  
AnswerRe: Opinion survey about ORM / DAL tools PinmemberMREcoolio9:04 19 Nov '09  
QuestionHelp files fomat Pinmembermarca2922:42 8 Oct '09  
QuestionQuestion on dependency of Business Layer with Data Access Layer Pinmembermeeram39522:54 27 Sep '09  
AnswerRe: Question on dependency of Business Layer with Data Access Layer PinmemberIan Shlasko4:21 28 Sep '09  
AnswerRe: Question on dependency of Business Layer with Data Access Layer PinmemberRozis5:46 29 Sep '09  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.5.120210.1 | Last Updated 13 Feb 2012
Copyright © CodeProject, 1999-2012
All Rights Reserved. Terms of Use
Layout: fixed | fluid