1
Reply

C# string array

dc

dc

Oct 6 2012 9:12 PM
1.5k
I have a question about the C# 2008 statement listed below:

string[] PkgIDs = rData.details.Where(c => c.batch_id == batchID).Select(c => c.Package_ID).Distinct().ToArray();
                 foreach (string PkgID in PkgIDs)
                 {
                 }
I would want to make certain an excpetion would not be generated in this situation.

If there is nothing selected for the PKgIDs [] table, do I need to to any check for this condition? If so, what would the check be?
Would you show me what code I would need to add?

Answers (1)