Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. WCF DataContract: Dictionary<string, object> Types must use StringComparer.OrdinalIgnoreCase

WCF DataContract: Dictionary<string, object> Types must use StringComparer.OrdinalIgnoreCase

Scheduled Pinned Locked Moved WCF and WF
csharpwcfcomhelpquestion
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chris Richner
    wrote on last edited by
    #1

    I must use StringComparer.OrdinalIgnoreCase instead of the default GenericComparer<> to compare the keys in the dictionaries. It's no problem to create and work service side with such Dictionaries because I have full control over creation of it. But when the generated client proxy communicates with the service the creation happens behalf of the deserializer ( ? ) and it's using the default GenericComparer<> instead of the StringComparer.OrdinalIgnoreCase. On one hand it seems that there is no way to change the Comparer after the dictionary was created because it is a constructor argument and on the other hand it makes no sense at all because all wsdl based generated proxies must have knowledge about the special comparer type as well. Is there any way to define the Comparer Type for DataContract Collection? read the full story here http://forums.microsoft.com/forums/ShowPost.aspx?PostID=3263018&SiteID=1[^] Thanks

    Chris Richner, raccoom.net

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups