C# codes for purpose of learning

milooot

Junior Member
Joined
Jan 4, 2012
Messages
164
Reaction score
34
anyone can provide a piece of code for purpose of learning , would help a lot beginner coders like me :)
 
google is your best friend for something like that, plenty of tutorials and code samples
 
you can find example codes online for almost anything you need to code.. So just think up a project, start coding and googling the piece of code you need to step up ahead..
 
try codeplex.com or codeproject.com
plenty of code examples you can learn from !
 
And everytime you are wondering sonethin or havin an issue take a look on stackoverflow.com
 
try to wrote something.. and when you will be not able to understand an error, etc.., ask google)
 
If you want to program complex windows applications take a look at WPF + MVVM + PRISM + UNITY/MEF + ....
 
i've been in development for over 10 years.

If I can give you one advice it is this:

Keep it simple
 
I'm going through this same process right now and MSDN along with the book "Head First C#" worked wonders for me ( I also purchased Illustrated C# 2012 but I did not find it a good read).
 
Head first books are usually okey (especially for java), but for c# there are some better alternatives such as "Visual C# step by step" and "C# all in One for Dummies".
 
Start with this:


public void main()
{
printnum(0, x=>Console.writeln(x));
}

public void printnum(int n, Action<T> k)
{
k(n);
}
 
google is your best friend for something like that, plenty of tutorials and code samples
I hate this type of posts, if there is google for something like that lets close this forum and use google, he asked for someone who have tried them and finds them best to share.
 
Start with this:


public void main()
{
printnum(0, x=>Console.writeln(x));
}

public void printnum(int n, Action<T> k)
{
k(n);
}


For a beginner, why do you suggest to learn about lamdas, generics, the Action class etc?

I would disagree totally that a beginner should even both with these, until they have a grasp of the basics. Plus it doesn't help, that the above is not usable code a programmer would ever write. If I was ever handed code like that, I would send it back.

For academic learning purposes, then yes the above has it's place, but that isn't what OP was asking for IMO


You can code perfectly well without any of the above, and before .net4.0 you could without Action and 3.0 (I believe) without lamdas etc)
 
  • Like
Reactions: Toz
Back
Top