Partager via


AllWebs Property

The AllWebs property of the SPSite class gets the collection of all Web sites contained within the site collection, including the top-level site and its subsites.

Property Value

A Microsoft.SharePoint.SPWebCollection object that represents the Web sites.

Example

The following code example displays in a console application the number of sites in a site collection.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security