using System;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Client;
namespace SiteTemplates
{
class Program
{
static void Main(string[] args)
{
using (SPSite site = new SPSite("http://serverName:1111/sites/SPSiteDataQuery/"))
{
using (SPWeb web = site.RootWeb)
{
SPWebTemplateCollection templateColl = web.GetAvailableWebTemplates(1033);
foreach (SPWebTemplate template in templateColl)
{
Console.WriteLine(template.Name + " - " + template.Title+" : "+ template.Description);
}
Console.ReadLine();
}
}
}
}
}