Tag Archives: Object Model

SharePoint Dispose Checker

SPDisposeCheck is a tool to help you to check your assemblies that use the SharePoint API so that you can build better code. It provides assistance in correctly disposing of certain SharePoint objects to help you follow published best practice. This tool may not show all memory leaks in your code. Further investigation is advised […]

Get Distinct Values from a SharePoint List field

Sometimes one would like to retrieve all distinct values of a field in a SPList. Actually it’s quite easy to accomplish, so here is my solution (of course you could pass the SPList directly to the method, but this is more flexible in my opinion)

Note: SPList.GetDistinctFieldValues() is deprecated in SharePoint 2010