Get value by string RRS feed

  • Question

  • Hi guys,

    I had a function like this: string GetValueByString(string field);

    I need to get a specific value if the field is equal to a keyword otherwise I would like to get another value

    How can I do that?

    Tuesday, November 9, 2010 5:52 AM


All replies

  • Hi Alberto,

    please try the duel GetValueByStringAndMaybeThinkOfBetterName on PexForFun and you'll have your answer.

    Hey, and you should definitely consider having a beer, Mr B. ;)



    Tuesday, November 9, 2010 7:14 PM
  • Sorry for kidding, Alberto

    Just realized that in fact it wouldn't be very helpful for you as it was. Have changed it, now it should. Please give it another try, in case.



    • Proposed as answer by meisl Tuesday, November 9, 2010 10:01 PM
    • Unproposed as answer by Alberto Bevilacqua Wednesday, November 10, 2010 1:02 PM
    Tuesday, November 9, 2010 8:41 PM
  • No meisl,

    you didn't understand my question.

    I need to mock a not mockable class (a sharepoint) and I would like to get a list or another one by the string I put in my function.

    Wednesday, November 10, 2010 7:43 AM
  • Alright, seems I was taking your initial post too literally. Somebody else plz take over.



    Wednesday, November 10, 2010 7:13 PM
  • Removed the duel from PexForFun; really too stupid.

    Tuesday, December 7, 2010 11:31 PM