locked
Get variable value with VB.NET RRS feed

  • Question

  • Can someone help me to convert this sentence for VB.NET

    Text = new InArgument<string>(env => "Message received from " + Name.Get(env).ToString())

    My problem is the 'env =>'  part.

    Thanks


    d1rtyw0rm

    Tuesday, March 13, 2012 3:19 AM

Answers

  • env => is a lambda statement short syntax meaning an anonymous Delegate, I think the VB equivalent is

    new InArgument<string>(Function(env) "Message received from" & Name.Get(env).ToString())

    Tim

    • Proposed as answer by Tim Lovell-Smith Wednesday, March 14, 2012 5:46 AM
    • Marked as answer by d1rtyw0rm Friday, March 16, 2012 1:57 AM
    Wednesday, March 14, 2012 5:46 AM