Question:
C# Programming - Starting?
Mark
2011-10-03 14:09:22 UTC
Hi,
I've been quite interested in c# programming lately, and I was wondering if anyone had any tips or guides that they learnt from?

I know a few basics, I just need to know what to do next, any help would be much appreciated.

Also, how do you insert images in to c# 2010 (net 4.0) in a console application?

Many thanks
Four answers:
CrazedChris
2011-10-03 14:26:31 UTC
Geez good question - theres such a wealth of info on this on google I don't think I can really better that!



If you are already a programmer then it should be fairly easy, and if you know OO (Object Oriented) even easier! If you are not a programmer would suggest starting out writing simple non OO programs in the console app, learning the sequence, selection and iteration concepts.



I learned to program by making simple games and it was good fun once I could declare variables, do conditionals, and loops. After this I went from procedural style programming to the next level by learning basic OO techniques, this is when your programming becomes a bit more practical.



You won't easily be able to get a console app to display an image, for that use a winform app project.



In short your question is a HUGE topic perhaps if you narrowed down the criteria, or gave more indication of what level you are at (what techniques you know so far) then perhaps people could provide more specific advice?
?
2011-10-03 14:20:43 UTC
I hope that you are using the Visual Studio 2010 to code.



First start with a basic project like a small windows application to wrk as a basic calculator,

After that move to more complicated projects like a basic game of tick tack toe.



You can also move into live projects like a software for you library.



Remember that there are hundreds of ways to achieve a task but always try to choose the most optimum solution. Try different methodological of coding n=and try to implement standards where ever possible



All the best and happy coding.
samofcalifornia
2011-10-03 23:47:24 UTC
The C# Corner is a web site with many articles and even some free books.



You can show an image in a form that is created and shown in a console program. For example, the following code does that. Note that for this code to compile, you must add a reference to System.Windows.Forms and System.Drawing.



System.Windows.Forms.Form f = new System.Windows.Forms.Form();

System.Windows.Forms.PictureBox pb = new System.Windows.Forms.PictureBox();

pb.Location = new System.Drawing.Point(0,0);

pb.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;

System.Drawing.Bitmap bm = new System.Drawing.Bitmap(fileToDisplay);

pb.Image = bm;

pb.Size = f.ClientSize;

f.Controls.Add(pb);

System.Windows.Forms.Application.Run(f);
2017-02-24 13:09:23 UTC
in case you desire to start c programming i propose you desire to start speedier c version 2.01 you're able to do a application fundamentals there earlier you bypass to c++. This c application i used while i replaced right into a newbie.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...