RecycleBinItem Class

Represents a Recycle Bin item in the Recycle Bin of a site or a site collection.


Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

[ScriptTypeAttribute("SP.RecycleBinItem", ServerTypeId = "{5ebf462e-9e9a-440c-992b-abbb3916563d}")]
public class RecycleBinItem : ClientObject

This code example displays the title and identifier of the first item in the Recycle Bin of the specified site.

using System;
using Microsoft.SharePoint.Client;

namespace Microsoft.SDK.SharePointFoundation.Samples
    class RecycleBinItemExample
        static void Main()
            string siteUrl = "http://MyServer/sites/MySiteCollection";

            ClientContext clientContext = new ClientContext(siteUrl);
            Site collSite = clientContext.Site;
            RecycleBinItemCollection collRBI = collSite.RecycleBin;


            if (collRBI.Count > 0)
               RecycleBinItem rbiItem = collRBI[0];
               Console.WriteLine("Title: {0}", rbiItem.Title);
               Console.WriteLine("Item ID: {0}", rbiItem.Id);
               Console.WriteLine("The Recycle Bin is empty.");

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.