locked
No listdictionary or Hashtable in Lightswitch ?? RRS feed

  • Question

  • I´d like to save row-objects and her names for special use in my Client-Code and

    used Code like This:

    using System.Collections.Specialized ;

    System.Collections.Specialized.ListDictionary MyRows = new ListDictionary();

    with or without using, it dont work.

    Errormessage is about  "Typ or Namespace not found in Namespace System.Collections.Specialized"

    Has anyone a little help for me ??

    Thanks

    Hermann

    Tuesday, March 5, 2013 2:47 PM

Answers

  • The current LightSwitch client is based on Silverlight, which doesn't have the ListDictionary class.

    Therefore in LightSwitch client code, you can only use classes that exist in Silverlight. In server code, you can use any .NET class.

    If you look at the MSDN page for the ListDictionary Class, you'll see there's no Silverlight option in the Other Versions combo box.


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    • Marked as answer by HermannHM Wednesday, March 6, 2013 5:03 PM
    Wednesday, March 6, 2013 2:37 AM
    Moderator
  • Hey Yann,

    i´m no so close to Silverlight,sorry. IMO Silverlight run only on different windows-versions and also i think, all Memoryclasses work there.

    Thank you for give me the right direction.

    In Silverlight the System.Collections.Generic.Dictionary<int,OPItem>

    do nearly the same.

    best regards

    Hermann

    • Marked as answer by HermannHM Wednesday, March 6, 2013 5:02 PM
    Wednesday, March 6, 2013 5:00 PM

All replies

  • The current LightSwitch client is based on Silverlight, which doesn't have the ListDictionary class.

    Therefore in LightSwitch client code, you can only use classes that exist in Silverlight. In server code, you can use any .NET class.

    If you look at the MSDN page for the ListDictionary Class, you'll see there's no Silverlight option in the Other Versions combo box.


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    • Marked as answer by HermannHM Wednesday, March 6, 2013 5:03 PM
    Wednesday, March 6, 2013 2:37 AM
    Moderator
  • Hey Yann,

    i´m no so close to Silverlight,sorry. IMO Silverlight run only on different windows-versions and also i think, all Memoryclasses work there.

    Thank you for give me the right direction.

    In Silverlight the System.Collections.Generic.Dictionary<int,OPItem>

    do nearly the same.

    best regards

    Hermann

    • Marked as answer by HermannHM Wednesday, March 6, 2013 5:02 PM
    Wednesday, March 6, 2013 5:00 PM
  • "i´m no so close to Silverlight,sorry. IMO Silverlight run only on different windows-versions and also i think, all Memoryclasses work there"

    I don't understand what you mean by this. Silverlight only has a subset of the code available in the full .NET framework.


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    Thursday, March 7, 2013 1:28 AM
    Moderator