c# - RestSharp deserialize list with a DateTime element as a child -


i have problem deserialize following xml restsharp:

<dates> <date>2013-04-30</date> <date>2013-04-16</date> <date>2013-04-05</date> <date>2013-04-20</date> <date>2013-04-06</date> <date>2013-04-13</date> <date>2013-04-04</date> </dates> 

obviously need deserialize list of datetime objects. i´ve tried like

public class dates : list<datetime> { } 

but not possible because datetime class name not match elements "date" name. of course i´ve set date format follows:

request.xmlserializer.dateformat = "yyyy-mm-dd"; 

so next step

public class dates {   [serializeas(name="date")]   list<datetime> dates; } 

but not working either, collection still returning empty. understand mixing datetime parsing , lists single element child is...inconvenient. possible parse kind of xml default restsharp xmlparser?


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -