Page 1 of 1

[C#] Programming Exercices

Posted: Tue Oct 20, 2009 3:30 pm
by Timie
Hello, Ive just started programming again after many months.
the last time i tryed i used c++ but i gave that up since i moved on things to fast and i felt that i went on beginning programming games and such ( with SDL ) before i learned the language properly,
i felt that my projekts where 80% copy and paste 15% altered copied code and 5% of my own.

anyways now i want a fresh start and ive heard good things about c# and since it have many similarities with c++ i decided to go with it.
since i just recently started with it i havent come so far in it ( school, private life you guys know the drill ) and i decided to take my own approach on things instead of rushing things like i did last time.
anyways i feel like that i need some exercices and perhaps smaller projects ( later or ) so i dont just read so i went here in hope of you guys helping with me some suggestions :lol:

the first i did was a codelock thing ( remember ive only coded in c# for like a day or two so dont flame on me that im noob cause i know that :mrgreen: )
Image
and i mean exercices like that, i´ve been trying to think of my own but i lack imagination :mrgreen:


P.S I know this is a forum for game developing and i hope its ok even tough this thread isint directly about game devving ( not wanna go down that path again for a while ;) )

Re: [C#] Programming Exercices

Posted: Tue Oct 20, 2009 4:02 pm
by Pickzell
Well, I don't know C#, so I can't tell you recommended exorcises, but you could try making up text games from what you do know.

I.e. You learn random numbers, you make (text-based)poker.

Re: [C#] Programming Exercices

Posted: Tue Oct 20, 2009 4:34 pm
by Falco Girgis
That's a pretty cool "Codelock." Way better than anything I had done after a day.

This forum is for general programming. I post all sorts of non-game development related stuff here on a regular basis. We also don't flame people for being new. Welcome. :D

Re: [C#] Programming Exercices

Posted: Tue Oct 20, 2009 5:05 pm
by dandymcgee
That looks like a fine start. I just started programming in C# the beginning of last month for my Intro to Programming class. So far it's not too bad, although I definitely prefer C++. The only thing that really bothers me so far is array declarations, but that' just a pet peeve.

Welcome to the forums and feel free to post if you have any questions about anything. :)

Re: [C#] Programming Exercices

Posted: Wed Oct 21, 2009 10:37 am
by MarauderIIC
Hmm... exercises.
How about populating a dropdown/combobox with all the lines from a particular file, based on the result of another dropdown, which lists all the files in the working directory?

So, like, say your c# executable is in mydir. And mydir has files
a.txt
b.txt
c.txt
e.exe
f.dat
g.doc
abc.txt

And "a.txt" contains
"why
qq moar
please 111 9328"

When you run your program directly (or set your project's working directory/position your files so that the program works right), dropdown 1's options are
a.txt
b.txt
c.txt
And dropdown 2 currently has no options.

And when you select a.txt, the options in dropdown 2 become "why" and "qq moar" and "please 11 9328".
Bonus: let the user define file matches with the usual wildcard style. IE, a* will make "a.txt" and "abc.txt" show up. *.doc will make "g.doc" show up. *b* will make "abc.txt" and "b.txt" show up. g.doc will make g.doc show up, and nothing else.

Re: [C#] Programming Exercices

Posted: Thu Oct 22, 2009 5:55 pm
by eatcomics
That's cool mar :)

What about a calculator? I would imagine that would be a good c# exercise...

Re: [C#] Programming Exercices

Posted: Thu Oct 22, 2009 10:20 pm
by XianForce
Well I've been recently going through C#, and I made a program that takes a string from the user, converts it to a byte array, encrypts the byte array, converts to a string then displays the encrypted string, then converts the string to a byte array, and decrypts, then displays the decrypted string.

I also had it display the byte arrays in debug mode...

It was fun =p

Re: [C#] Programming Exercices

Posted: Sun Oct 25, 2009 4:30 pm
by Timie
thanks for all your ideas.
i havent been able to be on the computer or study c# since i made this thread so i havent been able to reply sooner, sorry ;)

ill start with ur ideas, ill post here once i complete one :)