I've been recently working a lot of scripting with Powershell 2.0 towards SharePoint 2010, tasked with building various scripts that would for example print some information about 10,000 lists, as a part of a migration process. One of the requirements is to even get the size of those lists for us to have an idea about how big data we are really working with.
Now, getting the size of a document (file) from a SharePoint library is not my issue, I'm talking about the size of a list item (not document) from a SharePoint list (not library). Powershell did not seem to do the work, or? However, I switched to C# and I'm still having hard time getting it work. I'm pasting a screenshot of the relevant piece of code which does not work as one would expect:
The code is NOT written by me, would happily refer to the author but I have unfortunately not saved the links!
Is it even possible to get the size of an SPListItem?