{"action":"closed","issue":{"url":"https://api.github.com/repos/twilio/twilio-csharp/issues/174","labels_url":"https://api.github.com/repos/twilio/twilio-csharp/issues/174/labels{/name}","comments_url":"https://api.github.com/repos/twilio/twilio-csharp/issues/174/comments","events_url":"https://api.github.com/repos/twilio/twilio-csharp/issues/174/events","html_url":"https://github.com/twilio/twilio-csharp/issues/174","id":92196628,"number":174,"title":"Monitor.EventList doesn't seem to work when date range option set (C#)","user":{"login":"abhhart","id":9012249,"avatar_url":"https://avatars.githubusercontent.com/u/9012249?v=3","gravatar_id":"","url":"https://api.github.com/users/abhhart","html_url":"https://github.com/abhhart","followers_url":"https://api.github.com/users/abhhart/followers","following_url":"https://api.github.com/users/abhhart/following{/other_user}","gists_url":"https://api.github.com/users/abhhart/gists{/gist_id}","starred_url":"https://api.github.com/users/abhhart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhhart/subscriptions","organizations_url":"https://api.github.com/users/abhhart/orgs","repos_url":"https://api.github.com/users/abhhart/repos","events_url":"https://api.github.com/users/abhhart/events{/privacy}","received_events_url":"https://api.github.com/users/abhhart/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-30T20:48:50Z","updated_at":"2015-08-18T12:09:40Z","closed_at":"2015-08-18T12:09:40Z","body":"The sample C# code describing how to use the EventList with a date range filter throws a null reference exception on the \"foreach\"statment.   Commenting out the two lines that set StartDate and EndDate enable the sample to get past the foreach, but e.Description is still a null.  e.EventDate and e.EventType appear valid.\r\n\r\n// Download the twilio-csharp library from twilio.com/docs/csharp/install\r\nusing System;\r\nusing Twilio.Monitor;\r\nclass Example\r\n{\r\n  static void Main(string[] args)\r\n  {\r\n    // Find your Account Sid and Auth Token at twilio.com/user/account\r\n    string AccountSid = \"ACd21740e37b3651c4a53434ebc542e869\";\r\n    string AuthToken = \"{{ auth_token }}\";\r\n    var monitor = new MonitorClient(AccountSid, AuthToken);\r\n    var options = new EventListRequest();\r\n    options.StartDate = new DateTime(2015, 3, 1);\r\n    options.EndDate = new DateTime(2015, 4, 1);\r\n    var events = monitor.ListEvents(options);\r\n    foreach (var e in events.Events)\r\n    {\r\n      Console.WriteLine(e.Description);\r\n    }\r\n  }\r\n}"}}