How do I get all the templates for a client

Now I know under "Client", there is a method called "Templates()", but it returns a Inumerable<BasicTemplate>. I'm not sure how to handle that in .NET C#.

Can someone provide some example code of getting all templates for a paticular client in .net c#. Thanks.

jamesd jamesd, 6 years ago

Yes, the createsend_dotnet.Client.Templates() method returns an IEnumerable<BasicTemplate>.

Dealing with an IEnumerable<T> is a fundamental of C# programming, so you probably need to read the documentation.

You probably want to do something like:

var templates = client.Templates();
foreach (BasicTemplate t in templates) {
    // Do something

200,000 companies around the world can't be wrong.

From Australia to Zimbabwe, and everywhere in between, companies count on 
Campaign Monitor for email campaigns that drive real business results.

Get started for free