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
int firstInt = foo; // returns first
int fifthInt = foo; // returns 5th in array
Now () is typically for methods and constructors. so if I have an a string, I'd go
string myString = new string();
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.
int five = 5;
string theNumberFive = five.ToString();
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.
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.