Search Results

Search found 2 results on 1 pages for 'rosscj2533'.

Page 1/1 | 1 

  • Example of code generator you made from scratch?

    - by rosscj2533
    What are some examples of code generators you have used? I think it's a cool idea, but I have trouble thinking of things they can do besides make a class based on an object's attributes/database schema (as described in The Pragmatic Programmer). What language did you write them in and what language did they output? Edit: Thanks for the responses so far. What I am really looking for is examples of code generators made from scratch for some certain purpose. I mentioned it in the title, but didn't make it very clear in my question. How did you go about making a code generator on your own and what specificly did it achieve?

    Read the article

  • Why doesn't Win Forms application update label immediately?

    - by rosscj2533
    I am doing some experimenting with threads, and made a 'control' method to compare against where all the processing happens in the UI thread. It should run a method, which will update a label at the end. This method runs four times, but the labels are not updated until all 4 have completed. I expected one label to get updated about every 2 seconds. Here's the code: private void button1_Click(object sender, EventArgs e) { Stopwatch watch = new Stopwatch(); watch.Start(); UIThreadMethod(lblOne); UIThreadMethod(lblTwo); UIThreadMethod(lblThree); UIThreadMethod(lblFour); watch.Stop(); lblTotal.Text = "Total Time (ms): " + watch.ElapsedMilliseconds.ToString(); } private void UIThreadMethod(Label label) { Stopwatch watch = new Stopwatch(); watch.Start(); for (int i = 0; i < 10; i++) { Thread.Sleep(200); } watch.Stop(); // this doesn't set text right away label.Text = "Done, Time taken (ms): " + watch.ElapsedMilliseconds; } Maybe I'm just missing something basic, but I'm stuck. Any ideas? Thanks.

    Read the article

1