I got one custom boolean column/field which I want to check if it exists or not before checking its value, currently I am using this code but it ain't working like it should,
using (SPWeb web = properties.OpenWeb())
{
SPList list = web.Lists["List Name"];
foreach (SPListItem listItem in list.Items)
{
if (listItem.Properties["Boolean Property"] != null &&
bool.Parse(listItem.Properties["Boolean Property"].ToString()) == false)
{
//continue
}
else
{
i++;
}
}
}
I am using .Net framework 3.5 so can't use fieldexsist property.