We've found some cases where calling RecurrenceRule.TryParse ends up throwing an exception.
//in namespace Telerik.Web.UI
RecurrenceRule blah;
RecurrenceRule.TryParse("DTSTART:20140417T224500Z\r\nDTEND:20140417T234500Z\r\nRRULE:FREQ=YEARLY;INTERVAL=8;COUNT=1;\r\n", out blah); //exception
RecurrenceRule.TryParse("DTSTART:20140417T224500Z\r\nDTEND:20140417T234500Z\r\nRRULE:FREQ=DAILY;INTERVAL=8;COUNT=1;\r\n", out blah); //ok
RecurrenceRule.TryParse("DTSTART:20140417T224500Z\r\nDTEND:20140417T234500Z\r\nRRULE:FREQ=MONTHLY;INTERVAL=8;COUNT=1;\r\n", out blah); //exception
RecurrenceRule.TryParse("DTSTART:20140417T224500Z\r\nDTEND:20140417T234500Z\r\nRRULE:FREQ=MONTHLY;INTERVAL=1;COUNT=1;\r\n", out blah); //exception
RecurrenceRule.TryParse("DTSTART:20140417T224500Z\r\nDTEND:20140417T234500Z\r\nRRULE:FREQ=YEARLY;INTERVAL=1;COUNT=1;\r\n", out blah); //exception
Now, we can obviously wrap these calls in try/catch blocks or try to make the strings valid, but that defeats the entire purpose of the TryParse methods. They should return false if the string being passed in representing the datatype's value is invalid and/or not well formatted.
//in namespace Telerik.Web.UI
RecurrenceRule blah;
RecurrenceRule.TryParse("DTSTART:20140417T224500Z\r\nDTEND:20140417T234500Z\r\nRRULE:FREQ=YEARLY;INTERVAL=8;COUNT=1;\r\n", out blah); //exception
RecurrenceRule.TryParse("DTSTART:20140417T224500Z\r\nDTEND:20140417T234500Z\r\nRRULE:FREQ=DAILY;INTERVAL=8;COUNT=1;\r\n", out blah); //ok
RecurrenceRule.TryParse("DTSTART:20140417T224500Z\r\nDTEND:20140417T234500Z\r\nRRULE:FREQ=MONTHLY;INTERVAL=8;COUNT=1;\r\n", out blah); //exception
RecurrenceRule.TryParse("DTSTART:20140417T224500Z\r\nDTEND:20140417T234500Z\r\nRRULE:FREQ=MONTHLY;INTERVAL=1;COUNT=1;\r\n", out blah); //exception
RecurrenceRule.TryParse("DTSTART:20140417T224500Z\r\nDTEND:20140417T234500Z\r\nRRULE:FREQ=YEARLY;INTERVAL=1;COUNT=1;\r\n", out blah); //exception
Now, we can obviously wrap these calls in try/catch blocks or try to make the strings valid, but that defeats the entire purpose of the TryParse methods. They should return false if the string being passed in representing the datatype's value is invalid and/or not well formatted.