Easy to learn C# ??

Soldato
Joined
18 Aug 2006
Posts
10,048
Location
ChCh, NZ
I want to get into XNA development and have a lot of time on my hands since I only work nights. I know i'll need to learn C# and found a few websites and tutorials. Is C# the correct way to start learning programming or is there other languages that ease you into programming as a newbie.
 
Last edited:
Prepare yourself for hordes of yes and no arguments :)

C# is looked upon by some as 'hardcore' and thus learning programming with C# is like jumping in the deep end. That's possibly the primary reason for so many 'discussions', the other is that it's old. But old does not necessarily mean good or bad.

Either way.. just do it :) you've mentioned you need to know it, so go learn it :)
 
Dj_Jestar said:
Prepare yourself for hordes of yes and no arguments :)

C# is looked upon by some as 'hardcore' and thus learning programming with C# is like jumping in the deep end. That's possibly the primary reason for so many 'discussions', the other is that it's old. But old does not necessarily mean good or bad.

My thoughts on this are as follows. C# is one of the easier languages to learn compared to C/C++/asm etc... (it most certainly is not hardcore)
Actually learning the syntax is very easy infact, the hard part of programming is the algorithms/coming up with a good design to implement.

If you are wanting to program on the XNA framework you really only have the choice of C#. It depends what sort of applications you wish to build, and what areas of programming you want to get into.
There is no correct way to start programming, its easier to say what to avoid (VB/Basic) then it is to say what to do.

With C#/Java you don't need to worry about a lot of the inner workings as much as other languages, which gives you more time to concentrate on learning data structures/algorithms and such (main reason these days why uni's use java as their teaching language imo). If you learn C# its very easy to migrate to java and visa-versa.
Python is also good beginner language, and you have Pygame modules available which provide a wrapper for SDL (For doing all your GFX stuff).

Overall I don't think C# is a bad choice to start with, and there are plenty of docs/tutorials out there to follow.
 
Last edited:
Well, been playing around and learning the past 2-3 hours. Did all the basic console applications, Hello World etc. if statements, while loops, do loops, switches, Did Window forms, declared variables, arrays, wrote simple code to buttons, textboxes, listboxes, labels etc etc. Been looking at methods, classes, namespaces and objects, now it starts becoming......harder.
 
regulus said:
Well, been playing around and learning the past 2-3 hours. Did all the basic console applications, Hello World etc. if statements, while loops, do loops, switches, Did Window forms, declared variables, arrays, wrote simple code to buttons, textboxes, listboxes, labels etc etc. Been looking at methods, classes, namespaces and objects, now it starts becoming......harder.
Don't worry, you'll get your head around it; it's all very easy once you understand it :) Just try to view it as a challenge, and something to enjoy, rather than as a task.
 
Ok, making more sense now. I'm still very shaky on methods, classes and objects but I can see what they mean. Been wrestling with a big bear called "inheritance" the past hour. It's a bit more diffcult to understand. Haven't had so much info coming at me since doing my GCSE's. Suprised at the relative ease I'm finding C#. Expected it to be MUCH harder. I suppose the hard parts are still coming. Enjoying it tremendously though.
 
Last edited:
Don't rush it. Don't expect to learn the language inside out in a few days. Object oriented programmin is tricky to get your head around at first, so spend as much time on it as you need to to understand it. Practice is also incredibly helpful. Think of a small project to work on, give it a go, and if you can't do it, keep reading and absorbing information until you can :)
 
Inquisitor said:
Don't rush it. Don't expect to learn the language inside out in a few days. Object oriented programmin is tricky to get your head around at first, so spend as much time on it as you need to to understand it. Practice is also incredibly helpful. Think of a small project to work on, give it a go, and if you can't do it, keep reading and absorbing information until you can :)

I'm trying to write an online booking system. Very simple stuff really. Just takes in details and saves it to a SQL database and retrieves it back to a datagrid. I'm starting to see the different possibilities of what can be done with C#. Next (as in a month from now), I wanna try and do a CRM program.

Still tip toeing around using methods and too many objects. Just confuses me.
 
Last edited:
right you are now at the point where you need to atart thinking about application design properly.

Object orientation (classes, methods and inheritance) really do make coding medium to big applciation much easier. Good books to aid this are the gang of four's design patterns book (ISBN 0201633612).

this arcticle has a few good links in it as well:

http://en.wikipedia.org/wiki/Object-oriented_programming

obviously you've found msdn.microsoft.com already

Paul

edit I like bruce eckel's thinking in java as well which is VERY applicable to C# and .NET coding. it's avialable to download as a PDF of you google for his web site
 
I'm still trying to get my head around using proper syntax. One nasty habid I have so far is NOT commenting my code. I just got myself into a mess where I had no clue what certanly blocks of code was and had to redo everything. Still not 100% on the issue of classes (public and private) and their advantages. Also trying to incorporate exception handling which is proving extremely challenging. Great fun though!! :)

I think that I'm going to spend most of the day just reading code and online books to try and get my head around certain OOP principles. At the moment I just wanna write cool stuff without doing it the right way. Not the best way to go. Learn first, then do.

I'll also be leaning on you guys a bit when I get into the nastier stuff. Sounds like there's quite a few guys in the know here.
 
il be honest and say, i would prefer to learn java if i was beginning. learning c# with vc# express editions puts too much emphasis on GUI rather than the core topics when programming in OO.

when i learnt java i used Textpad, it sounds basic but it is the best way to learn the core stuff like loops , control statements , data structures etc.

then you need to start learning about classes, constructors , methods, toString(),

inheritance + abstract, interface

as you can see i havent said anything about learning GUIs etc this is learnt later on.

using an IDE as a beginner isnt as good as using a text editor, in order to use an IDE you need to think like a programmer otherwise you will get confused and expect more visual results early on
 
Last edited:
But don't you use an IDE anyway when programming commercially? I cannot see any company making their programmers use wordpad or notepad. Is it not better to learn using the IDE which you're going to use anyway if programming for a living?

As far as I know (admittedly not too much at the moment), GUI is just there for buttons, listboxes, datagrids etc. You still have to write real code, declaring variables, creating objects, use methods etc.

Not going against what you're saying, just wondering..
 
An IDE doesn't necessarily require a WYSIWYG GUI such as VB has.

netBeans or Eclipse.. both IDE's but don't have a "drag and drop" form generator.
 
Dont know if you know any of this but a few points....

Taking a lot of experience from visual studio an IDE does a lot more than just form generation.

It can debug your program step by step showing what values are in certain memory address's so when your program goes pear shaped you can see what variable has changed etc.

It also provides a way of predicting what function in a class you may want to use so you dont have to remember what is available if that makes sense hehe.

Of course the simplest feature but most important to me is the concept of a project. An IDE can organise all your custom header files in the same project so you dont have to worry about them being scattered.
 
regulus said:
But don't you use an IDE anyway when programming commercially? I cannot see any company making their programmers use wordpad or notepad. Is it not better to learn using the IDE which you're going to use anyway if programming for a living?

As far as I know (admittedly not too much at the moment), GUI is just there for buttons, listboxes, datagrids etc. You still have to write real code, declaring variables, creating objects, use methods etc.

Not always no, I use emacs or vi quite a lot which are not as fully featured as a graphical IDE when working with smaller amounts of code. With emacs you can perform 'open-heart surjury' on it and actually change the way it works quite radically using common lisp.
I would go as far as saying most linux developers don't use an IDE. Im quite undecided on whether you should use one for learning, you can spend a lot of time learning the actual IDE and not the code. There are many advantages though such as having an integrated debugger and so on. Its up to you, its by no means a requirement. I think with C# though you should really use VS.
 
Last edited:
Una said:
Not always no, I use emacs or vi quite a lot which are not as fully featured as a graphical IDE when working with smaller amounts of code. With emacs you can perform 'open-heart surjury' on it and actually change the way it works quite radically using common lisp.
I would go as far as saying most linux developers don't use an IDE. Im quite undecided on whether you should use one for learning, you can spend a lot of time learning the actual IDE and not the code. There are many advantages though such as having an integrated debugger and so on. Its up to you, its by no means a requirement. I think with C# though you should really use VS.

I read about Emacs (Eric Raymond's creation I think) a hour ago but it's still way above my understanding threshold. I'm using VS .Net 2005 (from MS website) and might consider aquiring it at a later stage.

I'm a bit concerned at the moment whether I should use an IDE or not. I don't want to let the IDE to everything for me and then get to a stage where I have to do "open heart surgery" but are unable to because VS did everthing for me.
 
If your running windows, stick with VS. I presume you are since you mention the XNA framework. Its pretty helpful to be able to view msdn from inside your IDE as a reference. What I said was mainly applicable to other languages, not something you really need to worry about at the moment :p
 
I think if i had started with visual studio or borland j builder at uni i wouldnt have handed in any assignment. Definitely best to start in notepad or some clone.
 
Back
Top Bottom