Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. SharePoint
  4. Could anybody please make me understand this coding based on SharePoint. I started learning SharePoint just 10 days ago.

Could anybody please make me understand this coding based on SharePoint. I started learning SharePoint just 10 days ago.

Scheduled Pinned Locked Moved SharePoint
csharpsharepointlearning
2 Posts 2 Posters 9 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mratyunjay Kaushik
    wrote on last edited by
    #1

    using (SPSite site = new SPSite("http://appes-pc/my/personal/dotnet")) // Site Collection
    {
    using (SPWeb web = site.OpenWeb()) // Site
    {
    SPList list = web.Lists["My Contacts"]; // List
    int i = 1;
    foreach (SPListItem item in list.Items)
    {
    Console.WriteLine("Item: " + (i++).ToString());
    Console.WriteLine(item.Name);
    Console.WriteLine(item.Title);
    Console.WriteLine(item.GetFormattedValue("First Name"));
    Console.WriteLine(item.GetFormattedValue("Last Name"));
    Console.WriteLine(string.Empty);
    }
    }
    }
    Console.ReadKey(false);

    L 1 Reply Last reply
    0
    • M Mratyunjay Kaushik

      using (SPSite site = new SPSite("http://appes-pc/my/personal/dotnet")) // Site Collection
      {
      using (SPWeb web = site.OpenWeb()) // Site
      {
      SPList list = web.Lists["My Contacts"]; // List
      int i = 1;
      foreach (SPListItem item in list.Items)
      {
      Console.WriteLine("Item: " + (i++).ToString());
      Console.WriteLine(item.Name);
      Console.WriteLine(item.Title);
      Console.WriteLine(item.GetFormattedValue("First Name"));
      Console.WriteLine(item.GetFormattedValue("Last Name"));
      Console.WriteLine(string.Empty);
      }
      }
      }
      Console.ReadKey(false);

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      See comments in your repost of this in QA.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups