title: Troubles on getting data from a List sharepoint 2013
body: <p>Im having some troubles when i try to retrieve data from a list in sharepoint 2013.</p>
  
  <pre><code>  SPSite osite = new SPSite(@"http://win-kee1pn6mrku");
  
    SPWeb web = osite.OpenWeb();
  
    SPList list = web.Lists["Calendar"];
    SPListItemCollection collection = list.Items;
  
    foreach (SPListItem item in collection)
    {
        Console.WriteLine(item["Title"]);
    }
  </code></pre>
  
  <p>And im getting this error: <a href="http://i1092.photobucket.com/albums/i404/3lb3njy/Trouble.png?t=1372343656" rel="nofollow">error</a></p>
  
  <p>I did a research in MSDN and i could connect to a diferent list in SharePoint 2010 using Visual Studio 2010, but now im using Visual Studio 2012 to connect to SharePoint 2013 and i dont get the same result.</p>
  
  <p><em>Im using the DLL Microsoft.SharePoint.</em></p>
  
  <p>Thanks!</p>