Daniel
Daniel

Reputation: 33

Whats the difference between SPListItem["property"] and SPListItem.Properties["property"]?

I've been working with the SharePoint object model and got that question.

Upvotes: 2

Views: 815

Answers (1)

Karel
Karel

Reputation: 2212

aListItem["property"] is not correct It is aListItem["fieldName"]

So:

aListItem["property"]

will get the value of the field named "property"

and

aListitem.Properties["property"]

will get the value of the property "Property" (eg List)

Upvotes: 4

Related Questions