I have the following code:
SPQuery oQuery = new SPQuery();
oQuery.Query = @"<Query>
<Where>
<And>
<Eq>
<FieldRef Name= PublishToSM />
<Value Type= Boolean >1</Value>
</Eq>
<IsNull>
<FieldRef Name= SMUpdateDate />
</IsNull>
</And>
</Where>
</Query>";
SPListItemCollection collListItems = list.GetItems(oQuery);
NevCoSocialMedia.NevCoFacebook fb = new NevCoSocialMedia.NevCoFacebook();
foreach (SPListItem oListItem in collListItems)
{
if (oListItem.Fields.ContainsField("PublishToSM") && Convert.ToBoolean(oListItem["PublishToSM"]) == true)
{
.
.
.
我的问题是,为什么我需要最后的<代码>if说明? 如果我没有这样做的话,那就会出现一个错误,那就是,在试图填写