Names Property

The Names property of the SPSiteCollection class gets the server-relative URLs of all the SPSite objects in the collection.

Property Value

A string array that contains the server-relative URLs of the site objects.


The following code example displays the number of sites and the URL of each site in a console application.


Platforms: Microsoft Windows Server 2003

Security: Code Access Security