A previous message asking about reading contents of ExtendedProperty pointed
to the unit test code in caltest.cs:

                    foreach (Object o in entry.ExtensionElements )
                    {
                        ExtendedProperty p = o as ExtendedProperty;
                        if (p != null)
                        {
                            Tracing.TraceMsg("Found one extended property");

                            Assert.AreEqual(p.Name, "
http://frank.schemas/2005#prop";, "Expected the same entry");
                            Assert.AreEqual(p.Value, "Mantek", "Expected the
same entry");
                            prop = p;
                        }
                    }


I'm attempting to translate that to VB which comes back from my converter
as:

                For Each o As Object In entry.ExtensionElements
                    Dim p As ExtendedProperty = o

                    If Not (p Is Nothing) Then
                        Console.WriteLine(p.Value)
                    End If
                Next o

But I get an exception at *Dim p As ExtendedProperty = o . *Is the same
exception being thrown in the unit test code but handled by an exception
handler? Or is it due some more nuanced difference between C# and VB?

thx
--steve...

System.InvalidCastException was unhandled
  Message="Unable to cast object of type 'Google.GData.Extensions.Comments'
to type 'Google.GData.Extensions.ExtendedProperty'."

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to