Created
August 29, 2008 18:58
-
-
Save ebello/8033 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string ToIDList<T, U>(List<U> lookuplist) where U : ILookup<T> where T : struct | |
{ | |
List<U> lookupidlist = lookuplist.FindAll(delegate(U lookup) | |
{ | |
return lookup.ID.HasValue; | |
}); | |
string idlist = String.Empty; | |
if (lookupidlist != null) | |
{ | |
string[] ids = new string[lookupidlist.Count]; | |
for (int x = 0; x < lookupidlist.Count; x++) | |
{ | |
ids[x] = lookupidlist[x].ID.ToString(); | |
} | |
idlist = String.Join(",", Unique(ids)); | |
} | |
return idlist; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment