About      |       Articles      |      Services      |      Software      |      Contact

Latest Free SharePoint Software

ARB Security Solutions regularly releases free SharePoint software, including WebParts, Client Applications, Framework Extensions, and other Miscellaneous Components.
The most recent freeware is:

Title: Simple SharePoint Rollup WebPart
Date Published: 10/22/2009

Previous Two Free WebPart Releases:

SecureCenter For SharePoint

By SharePoint security integrators, for SharePoint security integrators.

SharePoint Security Assurance Program™

For externally facing SharePoint deployments, security is an acutely important deployment concern. Learn how through daily security scanning, you can ensure external business users and partners that they can collaborate in confidence!

Security Assurance WebPart:



Returning SharePoint Folder Item Count In C#

A question was posted on the newsgroups on how to build a reusable method that could return the item count from a specified folder, here is one that works just fine:

C#:
  1. private int GetItemsForFolderInt(SPFolder folder)
  2. {
  3. int i = folder.Files.Count;
  4.  
  5. foreach (SPFolder myFolder in ((IEnumerable) folder.SubFolders))
  6. {
  7. i += GetItemsForFolderInt(myFolder);
  8. }
  9. return i;
  10. }

So, you would of course have to use recursion and recall the method itself within the declaration, and the output of this would just an integer.

:-)

  • Share/Bookmark

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment