Day 1 Homework Assignment Solution

Sign in to queue

The Discussion

  • User profile image

    You could ofcourse use the
    string message = (textBox1.Text == "20 10 30") ? "You saved the world" : "You die!";
    Which would be the easiest way here ;)

  • User profile image

    @Thee -- Yes, of course.  Please keep in mind that I'm assuming the viewer has only one day of experience.  There will be many ways to re-write these silly examples to make them more compact.  At this point (again, target audience is the absolute beginner), I'm just happy people are able to write this much!!!  But your point is well taken!  Smiley

  • User profile image

    Hi Clint and Bob, I mashed some up  here :) No story,  I will take a repeat on the previous videos. Can you tell me how to remove safely an unintentional namespace for let's say a event, seems helpful to me. (English is not my first language, and my C is not that sharp yet, so excuse me on the occasion.)

  • User profile image

    Hi Bob,

    I was wondering if it would be possible to create a count down timer for the '108 minutes' in the header?


  • User profile image

    Hi Bob, good video, but at the end you didnt explain how to do the extra bit of the assignment where you get the title page to change (where currently it says 108). I managed to do it, I set it to have a message saying Saved world or End of the World depending on what you typed, but would be nice to add that to the end of the video for people who managed to do that.



  • User profile image

    Like to add two requests/remarks:  In the phone emulator one can go back (<-) to see a page with  a choice list (with e.g. the choice Settings). To make the name of this app equal Brahma Initiative one (after some trials I discover) finds this name to change hidden in the file WMAppManifest.xml under tag <App xmlns...<Title= "Brahma Inititaive"> ....>. It also takes a restart of the phone emulator to see it appear.  Secondly: I like to know after setting the focus on the textbox how one can set (programmatically) the keyboard to the numeric keyboard on the top so the user can immediately startting to type the numbers.  By the way: nice to follow these sequences of steps so far in the serie. Thanks.

  • User profile image
  • User profile image

    Here is the code I used...

        if (myTextBox.Text == "2 4 15 17 23 42")
                        myTextBlock.Text = "Recalibrating Energy Core Complete...";
                    else myTextBlock.Text = "You lose Sucka!!!"; 

    The reason I bring it up is the I ommitted, and it worked just fine, the

    string message = ""'; or the string userValue = myTextBox.Text 

    Can someone explain what the purpose of doing it the other two ways above would ever have been for in the first place? 

    I am a super noob so all the help the better.

  • User profile image

    This works too:

    textBlock.Text=(textBox.Text=="4 8 15 16 23 42")?"OK":"KO";

  • User profile image

    very easy! Thanks! 

  • User profile image

    Thanks for this! Other than forgetting how to set the input scope focus, I think I'm quite on track here.

  • User profile image

    did we have to include a countdown to count down to 0 fdorm 180 if they eneter in the wrong code cux i thought we had to and that's what i got sstuck on

Add Your 2 Cents