SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I added a new column to Sharepoint Custom list which is boolean type, now each time I upload a item to list, it displays that column to check or leave it blank, by default its checked, I wanna access this property programmatically but can't remember how to do it.

public void Documents(string URL)
    using (SPSite site = new SPSite(URL))
    using (SPWeb web = site.OpenWeb())
        SPList list = web.Lists["Mes"];

        if (list.ItemCount != 0)
            foreach (SPListItem listItem in list.Items)


I guess using this statement

share|improve this question
up vote 2 down vote accepted

I think it's actually:


in SharePoint 2007/WSS 3.0

share|improve this answer
the one I added does work as well :) – Muhammad Raja Jul 30 '12 at 13:53
I meant to say "as well as". Thanks! – Mike Jul 30 '12 at 14:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.