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, 7 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

See why 200,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free