Creating and Calling Simple Helper Methods - Day 1 - Part 15
- Posted: Nov 11, 2010 at 5:44 PM
- 29,148 Views
- 8 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
As Bob has already said several times throughout Day 1, methods are simply named blocks of code. Since methods have names, you can call them by name and their code blocks will execute. This video explains when to do this, how to create and call the method, and how to both pass values into a method and retrieve values from a method.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
Very nicely done - thanks :)
awesome!!
You really knows how to explain this stuff in a very efficient way. C# is easier than I thought, since we master the syntax everything is bread and butter. Thanks, Bob.
Nicely done...
I keep getting "Hello World, (0)" when I hit the button. What am I doing wrong? Here is my code (the video resolution isn't clear enough for me to tell if I am using the correct characters) :
{ textBlock1.Text = superSecretFormula("Bob"); } private string superSecretFormula(string myName) { return string.Format("Hello World, (0)!", myName); }
@Pairoj: It looks like you put parenthesis around your zero instead of curly brackets, which I suppose would mean the program sees the zero as nothing special. You would want your final line to be: return string.Format("Hello World, {0}!", myName);
What's the program your using to record on screen?
@Griffin: I think that is Camtasia Studio.
Remove this comment
Remove this thread
close