Declaring Variables and Assigning Values - Day 1 - Part 9
- Posted: Nov 11, 2010 at 5:35 PM
- 38,140 Views
- 16 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…”
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 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?
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