Click here to Skip to main content
15,881,588 members
Home / Discussions / C#
   

C#

 
QuestionC# string array Pin
sc steinhayse6-Oct-12 15:11
sc steinhayse6-Oct-12 15:11 
AnswerRe: C# string array Pin
Dave Kreskowiak6-Oct-12 20:26
mveDave Kreskowiak6-Oct-12 20:26 
Based on what you've posted so far, there is no exception possible. But, since we can't see the code that declared these types, the details collection, how it's populated, ..., we really couldn't tell you for sure.

But, if the Select returns no ID's, the array will come back empty and the foreach iterating over it won't do anything.

You don't have to change this code at all.

Next time, you might want to try testing the code with test data specifically designed to try and break it.

AnswerRe: C# string array Pin
Eddy Vluggen7-Oct-12 1:13
professionalEddy Vluggen7-Oct-12 1:13 
AnswerRe: C# string array Pin
montevina 28-Oct-12 1:30
montevina 28-Oct-12 1:30 
GeneralRe: C# string array Pin
BobJanova9-Oct-12 0:09
BobJanova9-Oct-12 0:09 
AnswerRe: C# string array Pin
BobJanova9-Oct-12 0:10
BobJanova9-Oct-12 0:10 

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

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