View Single Post
  #7 (permalink)  
Old March 3rd, 2010, 04:39 PM
Will Will is offline
Friend of Wrox
Join Date: Feb 2009
Posts: 194
Thanks: 5
Thanked 3 Times in 3 Posts

PeterPeiGuo's code is correct and simplier. However, in my own defense, the purpose of the exercise was to get people to think about array indexing, Indeed, the exercise specifically asks for array indexing. That's why I framed it as a "pure" array rather than an array object, which Peter does.
All I meant was I often look at your solutions and they are much simpler than mine..

Mine always seem to take what I think are necessary steps but when I see a simpler version I realise how convoluted my solution was..

Another thing to keep in mind: Microsoft provides language features in C# that are not always found in other languages (e.g., LINQ) and, if you end up programming professionally, you may find a certain language feature missing in your new development language.
Would you recommend looking at other books then and other languages as opposed to just focusing on Microsoft technologies?

Agree with Jack, and I do recommend you to read about LINQ, and read a lot about it. Personally that's one of the best language features I have seen among all languages. If you care about database stuffs, read about entity framework.
I will check out LINQ when I have a better handle on the basics.
Follow me on twitter.

Where I work.

Connect with me on LinkedIn