Skip to content

Commit 65f47ba

Browse files
authored
docs: Add example (#791)
1 parent 29aa94b commit 65f47ba

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

examples/ListMessages.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
```csharp
2+
using System;
3+
using Twilio;
4+
using Twilio.Base;
5+
using Twilio.Exceptions;
6+
using Twilio.Rest.Api.V2010.Account;
7+
8+
class Program
9+
{
10+
static void Main(string[] args)
11+
{
12+
TwilioClient.Init("TWILIO_ACCOUNT_SID", "TWILIO_AUTH_TOKEN");
13+
14+
var messages = MessageResource.Read(limit: 20);
15+
foreach (var record in messages) {
16+
Console.WriteLine(record.Body);
17+
}
18+
}
19+
}
20+
21+
```

0 commit comments

Comments
 (0)