[Evolution-hackers] Evolution.Contact.Set(ContactField field, IntPtr value)



Hi all,
I'm playing around a little bit Evolution-sharp. Since .NET is all new to me I have some problems setting fields of contact instances. I would really like to use the Set function but when I try I get compilation errors all the time. Consider the following snippet:

Contact c = new Contact();
ContactAddress addr = new ContactAddress();
           
addr.Country = "Sweden";
addr.Street = "Test";
addr.Code = "SE-123 23";
addr.Region = "Gothenburg";
           
c.Set(ContactField.AddressWork, addr);    // CS1503
c.Set(ContactField.Email, "a b com");    //CS1503

The compilation error is that i simpy can't cast my stuff to IntPtr. Is there a way to cast correctly so I can use the function?

Regards,
// Marcus


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]