I had a scenario where I have to iterate the same List name in a Site Collection but different sub sites.
Interesting fact is the list has different Fields.
Even though we don't have a method to verify if a list exist but there is one to check if a Field exist in SharePoint List/Document Library.
SPList list = site.Lists["Your List Name"];
list.Fields.ContainsField("Yout Field Name")
No comments:
Post a Comment