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

Join 150,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free