Hello, I am trying to grab the exceptions date collection from a calendar object using a C# ADODB recordset. Where can i find the data type mappings for the various urn:schemas:calendar fields? What data type would i used for this. I am using .Net 2.0 - so i have generics available to me, but still exploring their implementation. my requirement is to be able to iterate over the list of items in the collection - in visual basic, i would do something like this: dim varExceptions varExceptions = rs.Fields("urn:schemas:calendar:exdate") For Each varExc in varExceptions do something with varExc which is a Date variable Next But, how to do this in c#? Thank you.
That data type is VT_VARIANT which is basically an array of variants. see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_cdo_schema_calendar_exdate.asp In C# you usually just treat it as an object array eg object[] exdates = (object[])rec.Fields["urn:schemas:calendar:exdate"].Value; foreach (object exdate in exdates){Console.WriteLine(exdate.ToString());} Cheers Glen "Cord Thomas" wrote in message news:eG5lUPSMGHA.2472@TK2MSFTNGP11.phx.gbl... > Hello, > > I am trying to grab the exceptions date collection from a calendar object > using a C# ADODB recordset. > > Where can i find the data type mappings for the various > urn:schemas:calendar fields? > > What data type would i used for this. I am using .Net 2.0 - so i have > generics available to me, but still exploring their implementation. > > my requirement is to be able to iterate over the list of items in the > collection - in visual basic, i would do something like this: > > dim varExceptions > > varExceptions = rs.Fields("urn:schemas:calendar:exdate") > > For Each varExc in varExceptions > do something with varExc which is a Date variable > Next > > But, how to do this in c#? > > Thank you. >