C# Fundamentals for Absolute Beginners: (09) for Iterations

In this lesson, we talk about arrays, which are multi-part variables—a "bucket" containing other "buckets," if you will. We demonstrate how to declare and utilize arrays, and we demonstrate a couple of powerful built-in methods that give arrays added features.
Full course outline:
kinda hard to follow
please give numerical examples and explain step by step
you talk way too much from a developer point of view which is extremely hard to grasp for someone without programming experience
Sir, I don't understand the function of "in names" in foreach statement in line 34. Please explain it.
thanks a lot~ it's helpful for me. I do like these series.
Hi Bob, first thanks for the video. it really is good.
One thing in this session, when doing charArray, the line Array.Reverse(charArray); has error with red line on Reverse.
The error is the type or namespace name 'Reverse' does not exist in the namespace 'Array'. Can you help? I have checked the commands should be correct
@philliphs: I would tell you to download my code and compare it to yours to make sure it is working on your computer. However, I can't get Microsoft to add a link to the source code after 3 months of trying (?) so I'm going to suggest you send me your code. bob@learnvisualstudio.net
Hey Bob,
First of all i wanna thank u for doing this, for a lot of ppl like me, who absolutely zero experience in programming this is something of incredible value.
What i wanted to ask (to get a good grasp on each lesson) is there any way u can add some exercises with answers after lessons? Just so we use learned knowledge of lesson and apply it to different task before we move on to next lesson?
Ty again!
@Kristijan: Glad they help! I actually do that on my own website. It's a popular feature.
Hey Bob. These videos have been great so far, but I've ran into an issue that I've been unable to solve. When I run the following code -
string[] names = new string[] { "Anna", "Kalle", "David", "Sara" };
foreach (string name in names)
{
Console.WriteLine(names);
}
Console.ReadLine();
I get the following result:
System.String[]
System.String[]
System.String[]
System.String[]
For what reason might this be? All help is appriciated :)
I resolved the issue!
It should be "Console.WriteLine(name);" and not "names". Yesterday I figured that the type "name" previously in the code was some kind of command, not a variable. I know realize it's just another "bucket". The code presented now makes much more sense. Great videos Bob!
thks alot for your time, Bob.
Dear Bob,
No doubt its an amazing and one of the best tutorial I have ever found.
just did not understand FOREACH function. why and when should we use it?
thank
@arifuddin: It is an elegant way to iterate through an array or collection, one iteration for each item in the array or collection. This allows you to inspect / write logic that involves each item in the array / collection. You will need this often ... you will frequently be working with "sets" of data (collections, arrays) and will want to search through the data for one item you're looking for, or perform some operation / logic on every item in the array / collection. Once we get into classes / objects / collections you'll see some practical applications. :)
How to fully grasp these concepts.I mean there must be some sort of examples.Secondly arrays have many other things in them like multidimensional arrays etc.How to learn them?
Dear Bob,
I Love the tutorial and I wanted to let you know that your Lost reference was noticed and appreciated! Thank You for doing these videos.
Van Halen? Nice.
I have a mistake in line
Console.Write(varChar);
until i change it into
Console.Write(charArray); only after this the code worked perfectly.
Like the Lost reference xD
Good videos btw really learned from them
Hay Bob,
I have a question about lesson 10, to be precise using new int or new string as a part of this line:
string[] names = { "Anna", "Kalle", "David", "Sara" }
what is its purpose, I have checked it works without it.
Thanks
Very good videos....
@DVelis - if you haven't found out yet, you use the new operator when you don't want the variable/object/whatever to be destroyed when it goes out of scope. If you created a variable in a for loop, for example, and want it to be accessed after the for loop completes, then you would declare it using the new operator. Source: http://stackoverflow.com/questions/679571/when-to-use-new-and-when-not-to-in-c
For those having issues like philliphs ("error with red line on Reverse."), Try changing the following line:
Array.Reverse(charArray);
with
System.Array.Reverse(charArray);
Source:
https://social.msdn.microsoft.com/Forums/en-US/df75758b-fe09-4013-a00a-b715515b0901/problems-with-namespace-array?forum=csharpgeneral
Who else has got the Lost reference?
When I read the first comment on this video, I couldn’t believe it - the person said you “talk too much”.... Just goes to show we all have different learning styles. I have watched a number of other other C# tutorials and I prefer your teaching method.
I appreciate the overview and detail that you provide.
And it’s free! (The other courses I paid for).
Thanks for the videos Bob;
I'm an old programmer, from way back to the Hex decimal days and Basic, I thought in my spare time I would re-educate my self and do some simple programming for family and friends, your videos are a welcome addition and a good resource in getting me back into the world of programming, Thank You !!