This project is read-only.

SPListCollection Extension Methods

bool Contains(string name)
bool Contains(Guid id)
bool Contains(Func<SPList, bool> match)
Determines whether the specified SPList can be found in the collection.
Note: You can use the two build in variations (id or name) or you can add your own way of determining if the list exists.
if (web.Lists.Contains("somelist"))
  // this code will not throw an exception 
  list = web.Lists["somelist"];

Last edited Feb 19, 2010 at 1:48 PM by jole, version 4


No comments yet.