Declaring Variables and Assigning Values - Day 1 - Part 9
- Posted: Nov 11, 2010 at 5:35 PM
- 31,040 Views
- 16 Comments
Download
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It's an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.
Right click “Save as…”
- High Quality WMV (PC, Xbox, MCE)
- MP3 (Audio only)
- MP4 (iPod, Zune HD)
- Mid Quality WMV (Lo-band, Mobile)
We now focus on learning the C# programming language. In this video, Bob explains variables and data types, as well as setting and retrieving variable values.
Comments Closed
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
Good video but I ran into a problem. When you typed y.ToString square braces appeared at the end [ ] but that doesnt work for me, it does work however if I use the curved braces ( ), I don't understand why
I was also JUST watching the video and I watched the same thing and was about to comment on it. Really cool but can you please explain the () at the end and how, if we had not seen it we would have known to put the () at the end of the line.
[quote]
1 day ago
I was also JUST watching the video and I watched the same thing and was about to comment on it. Really cool but can you please explain the () at the end and how, if we had not seen it we would have known to put the () at the end of the line.
[/quote]
It's part of the syntax of C# but you really didn't need to know that because when you put the . after y the intellisense auto-completion added the () to the end after you selected .ToString(). Visual Studio would have told you that this was a problem as well. I think it even goes so far as to tell you that it expects parentheses.
@Mintydog: brackets in a C style language like c# implies an index to an array or collection. so if I had an array of integers called foo that has 10 objects, I'd go
Now () is typically for methods and constructors. so if I have an a string, I'd go
If I have an integer and wanted to change it into a string, I have to cast it. Since .ToString is a method, I have to do use () since some methods allow you to pass stuff in. With (), I'm passing in nothing.
He did infact use 'toString()'. It is because of the video quality that it appeared as '[]'. :)
@Joseph Clover: Ah, we do have the high quality versions and the source code examples for download as well for each video
@Clint: Where can I find the high quality versions. The quality is pathetic in these. Can't read a word!
where can i change the settings to have these () after ToString,too?
This is too funny!
Clint,
Just wanted to tell you I think you are doing a fantastic job with these videos. Thanks for putting these together for everyone.
TechieGirl1
Totally new to all this but downloaded the latest tools (the beta) and it seems that the conventions for defining variables is different than the video. Using the Dim string instead of Int?
I'm confused. Can anyone help?
Again, a total newbie but it seems like when I try to edit actions on a control I'm working in VB and he's working in C#. Does that make sense and how do I switch?
Nevermind, I'm a moron. Figured it out.
Thanks All these videos are great tutorials!
Good video, thanks.
First off excellent video's, thanks for posting them.I am a total norvice, can you tell me how you convert doubles to string please.
Thank you in advance.
Regards Phil
Remove this comment
Remove this thread
close