---
title: "Access the children of an item"
slug: "access-the-children-of-an-item"
abstract: "How to access the children of an item using the Sitecore.Data.Items.Children property."
---
# Access the children of an item

You can use the `Sitecore.Data.Items.Children` property to access the children of an item. For example, to access the children of the `/Sitecore/Content/Home` item in the *Master* database:

```csharp
Sitecore.Data.Database master = Sitecore.Configuration.Factory.GetDatabase("master");

Sitecore.Data.Items.Item home = master.GetItem("/sitecore/content/home");

foreach(Sitecore.Data.Items.Item child in home.Children)
{
    // Process child item
}

```

The system creates a new `Sitecore.Collections.Childlist` object each time you access the `Sitecore.Data.Items.Item.Children` property. The implementation of the C# for each statement accesses the property only once.

```csharp
Sitecore.Data.Database master = Sitecore.Configuration.Factory.GetDatabase("master");

Sitecore.Data.Items.Item home = master.GetItem("/sitecore/content/home");

Sitecore.Collections.ChildList children = home.Children;

for(int childIndex=0; childIndex<children.Count ; childIndex++)
{
    // Process child item
}

```

You can also get the children items by invoking the items `GetChildren` method. For example, to retrieve children items of the current page, use this code:

`var children = currentPage.GetChildren();`