C# Fundamentals for Absolute Beginners: (10) Creating Arrays of Values

Play C# Fundamentals for Absolute Beginners: (10) Creating Arrays of Values

The Discussion

  • User profile image

    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

  • User profile image
    Meet Patel

    Sir, I don't understand the function of "in names" in foreach statement in line 34. Please explain it.

  • User profile image

    thanks a lot~ it's helpful for me. I do like these series.

  • User profile image

    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

  • User profile image

    @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

  • User profile image

    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! 

  • User profile image

    @Kristijan: Glad they help!  I actually do that on my own website.  It's a popular feature.

  • User profile image

    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)


    I get the following result:


    For what reason might this be? All help is appriciated :)

  • User profile image

    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!

  • User profile image
    Mohamed Ahmed

    thks alot for your time, Bob.

  • User profile image

    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?



  • User profile image

    @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.  :)

  • User profile image
    Salman Afzal

    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?

  • User profile image

    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.

  • User profile image

    Van Halen? Nice.

  • User profile image

    I have a mistake in line
    until i change it into

    Console.Write(charArray); only after this the code worked perfectly.

  • User profile image

    Like the Lost reference xD
    Good videos btw really learned from them

  • User profile image

    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.





  • User profile image

    Very good videos....

  • User profile image

    @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

  • User profile image

    For those having issues like philliphs ("error with red line on Reverse."), Try changing the following line:

  • User profile image

    Who else has got the Lost reference?

  • User profile image

    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).

  • User profile image
    Danny Chatterson

    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 !!

  • User profile image
    Bob's explanation is clear and he talks just good enough to explain the concepts. Stop whining like a 5 yr old

Add Your 2 Cents