none
Hands-on Labs of Reactive Extensions for .NET (Rx) doesn't work

    Question

  • Hi,

    I am using the Hands-on Labs of Reactive Extensions for .NET (Rx) PDF.

    Most of the examples are not working anymore.

    I'm getting some weird kind of errors.

    Till Excersie 2, However I made it work.

    But from Exercise 3 – Importing .NET events into Rx, it's not working anymore.

     

    Say for the below example,

     

         var lbl = new Label(); 
         var frm = new Form { Controls = { lbl } };
    
         frm.MouseMove += (sender, args) =>
         {
           lbl.Text = args.Location.ToString();
         };
    
         Application.Run(frm);

    The Error it's giving is :

    Error 1 A local variable named 'args' cannot be declared in this scope because it would give a different meaning to 'args', which is already used in a 'parent or current' scope to denote something else C:\My Documents\Visual Studio 2010\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs 15 37 ConsoleApplication1

    And for the rest of the examples, this kind of more errors are going on.
    Any help?

     


    Thanks & Regards, Naimish Pandya [MCTS, MCPD] http://naimishpandya.wordpress.com/
    Thursday, July 7, 2011 11:43 AM

All replies

  • No reply still??
    Thanks & Regards, Naimish Pandya [MCTS, MCPD, MVP] http://naimishpandya.wordpress.com/
    Tuesday, October 4, 2011 5:45 AM
  • Hi Naimish,

    I don't think you read the instructions carefully enough. The default `Program.cs` is replaced by the following code:

    using System.Linq;
    using System.Windows.Forms;
    
    class Program
    {
        static void Main()
        {
            var lbl = new Label();
            var frm = new Form
            {
                Controls = { lbl }
            };
    
            frm.MouseMove += (sender, args) =>
            {
                lbl.Text = args.Location.ToString();  // This has become a position-tracking label. 
            };
    
            Application.Run(frm); 
        }
    }
    


    In this code there is only one `args` so the code compiles.

    Cheers.


    James C-S
    Tuesday, October 4, 2011 6:26 AM
  • I've started working through the lab using Rx v1.0 but the document seems to be out of date, e.g. System.CoreEx no longer exists, and methods such as subscriber.Run and Observable.GenerateWithTime have disappeared. I don't see any point in proceeding with the lab if these problems are going to hinder my attempts at learning.

    Is there an updated version anywhere, or can someone recommend a good Rx tutorial?

    Thanks in advance

    Andy

    Thursday, April 26, 2012 8:25 AM
  • We will update documentation in the Rx v2.0 timeframe. Thanks for reminding us and sorry for the inconvenience!

    using (Microsoft.Sql.Cloud.DataProgrammability.Rx) { Signature.Emit("Bart De Smet"); }

    Friday, April 27, 2012 5:16 AM
    Owner
  • I assume that DEVHOL203 will be updated to actually work with the nuget libraries.

    It is really frustrating to want to ramp up on a technology when examples, documentation, etc. are all over the place.

     

    Tuesday, June 19, 2012 10:10 PM
  • We will update documentation in the Rx v2.0 timeframe. Thanks for reminding us and sorry for the inconvenience!

    using (Microsoft.Sql.Cloud.DataProgrammability.Rx) { Signature.Emit("Bart De Smet"); }


    Looks like you are very busy  - not had time for more than 2 years? Very frustrating
    Wednesday, September 24, 2014 10:42 AM
  • Any update @Bart De Smet ?
    Sunday, November 5, 2017 4:53 AM