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'm relatively new to SharePoint 2010 development and I recently rediscovered the DataContext class. Of particular interest right now is the GetList method. I've seen examples and sample code around the Interwebs about how to use it, but most of the time it is used with Lists, List items, and the like.

Unfortunately, I'm working with a Library at the moment, not a List. Can GetList also work with Libraries as well as Lists? If not, is there a similar way to update individual items in a Library from an InfoPath 2010 form code behind in C#?

Thank you all in advance for help and advice!

share|improve this question
Here is a related post:… – user7400 Jan 31 '13 at 19:40
It should yes, lists and libraries are the same thing when it comes to the API, they just have a different piece of internal metadata that denotes it's a library vs a list (for display porposes I believe). – Eric Alexander Jan 31 '13 at 19:46
Thank you @PirateEric! – RX3R0 Jan 31 '13 at 20:12
Thank you for that info @user7400. – RX3R0 Jan 31 '13 at 20:13

Your Answer


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

Browse other questions tagged or ask your own question.