Subject: for c# beginers
Posted By: Kalyan Khetre Post Date: 7/23/2008 3:06:15 AM
hi friends,
i am beginner to d c#. i am facing a prob. that i have a prog. which runs successfully but it only stays for fraction of seconds. what i have to do so that d i can see output.
suggestion invitable.
have a nice day.
Reply By: robzyc Reply Date: 7/23/2008 3:11:39 AM
Sounds like your running a console app. Which terminates and closes.

Either run with Control+F5, and it will ask you to press a key to continue once the program has ended, or
(and this is the preferable option) Add some code like:

Console.WriteLine("Press Enter to Continue");
Console.ReadLine()
This will display the text and wait for an ENTER KeyPress,

Rob
http://cantgrokwontgrok.blogspot.com
Reply By: Kalyan Khetre Reply Date: 7/23/2008 3:27:32 AM
quote:
Originally posted by robzyc

Sounds like your running a console app. Which terminates and closes.

Either run with Control+F5, and it will ask you to press a key to continue once the program has ended, or
(and this is the preferable option) Add some code like:

Console.WriteLine("Press Enter to Continue");
Console.ReadLine()
This will display the text and wait for an ENTER KeyPress,

Rob
http://cantgrokwontgrok.blogspot.com


Reply By: robzyc Reply Date: 7/23/2008 3:35:31 AM
Errr..

So does that solve your problem?

Rob
http://cantgrokwontgrok.blogspot.com
Reply By: Kalyan Khetre Reply Date: 7/23/2008 3:36:45 AM
thank u..........!
can you send me some practice tutorials so i can learn d concepts c#.
have nice day.
quote:
Originally posted by robzyc

Sounds like your running a console app. Which terminates and closes.

Either run with Control+F5, and it will ask you to press a key to continue once the program has ended, or
(and this is the preferable option) Add some code like:

Console.WriteLine("Press Enter to Continue");
Console.ReadLine()
This will display the text and wait for an ENTER KeyPress,

Rob
http://cantgrokwontgrok.blogspot.com


Reply By: samjudson Reply Date: 7/23/2008 3:39:36 AM
Could we recommend that perhaps you get yourself a good book? (This is the WROX web site you are on after all).

/- Sam Judson : Wrox Technical Editor -/
Reply By: robzyc Reply Date: 7/23/2008 3:44:54 AM
You're welcome

No, I cannot send you some practice tutorials so you can learn the concepts of C# programming!
You can go out, spend some money on books and other training materials like the rest of us have.

If you want to be a "professional" developer, then invest in your career.

I have spent over £6000 on training materials and I still have a long way to go.

Please respect the fact that all the guys that contribute on here also have their own work
and learning to do. Do NOT expect to be "spoon fed". We all had to start somewhere
and we are always happy to help. But I would say 80% of development is about having the
ability and desire to want to learn, grow and develop.

Dont ask for training/tutorials. Ask yourself the same questions. What do I need to know?
Then go and buy a book/course/research on the Internet.

If you get stuck of some of the code. THEN ask here.

This is "programmer to programmer" - not "programmer to teach you programming".

Rob
http://cantgrokwontgrok.blogspot.com
Reply By: edurazee Reply Date: 7/23/2008 4:01:30 AM
You can write :-

Console.WriteLine("Press any key to continue...");
Console.ReadKey(true);

Or,

Console.WriteLine("Press Enter to Continue");
Console.ReadLine();


The difference between the first one and the second one is, the first one will work for any key in the KB.

But the later will work only for ENTER(Return) key.


Reply By: Kalyan Khetre Reply Date: 7/23/2008 4:20:07 AM
hi Rob,
thank's for guidance.
i'm student of M.Sc. I.T. i'm in little confusion to choose d opt. subjects. We have 5 opt. subject of which i have to chose 2.
but which sub's should i hve take for my career point of view. considering : i hv interest in programming. i hv no knowledge of physics or electronics.
the subjects are:
 1. Emebded System.
 2. Image Processing
 3. Artificial Imaging
 4. WAP
 5. WML

pls reply with explainations
hnd
quote:
Originally posted by robzyc

You're welcome

No, I cannot send you some practice tutorials so you can learn the concepts of C# programming!
You can go out, spend some money on books and other training materials like the rest of us have.

If you want to be a "professional" developer, then invest in your career.

I have spent over £6000 on training materials and I still have a long way to go.

Please respect the fact that all the guys that contribute on here also have their own work
and learning to do. Do NOT expect to be "spoon fed". We all had to start somewhere
and we are always happy to help. But I would say 80% of development is about having the
ability and desire to want to learn, grow and develop.

Dont ask for training/tutorials. Ask yourself the same questions. What do I need to know?
Then go and buy a book/course/research on the Internet.

If you get stuck of some of the code. THEN ask here.

This is "programmer to programmer" - not "programmer to teach you programming".

Rob
http://cantgrokwontgrok.blogspot.com


Reply By: robzyc Reply Date: 7/23/2008 4:29:38 AM
Wow.. I can only reply with the following:

OMFG. STFW. WTFFFFF!

So let me get this straight. You want me to explain to you what courses to take in your degree, since you have no idea what they mean?
So you have taken up a MASTERS degree with no prior understanding of what is actually involved?



Rob
http://cantgrokwontgrok.blogspot.com
Reply By: samjudson Reply Date: 7/23/2008 5:28:27 AM
Physics and electronics? What have they got to do with those five subjects exactly?

/- Sam Judson : Wrox Technical Editor -/
Reply By: planoie Reply Date: 7/23/2008 6:35:35 AM
A little cranky today are we Rob?

-Peter
compiledthoughts.com
Reply By: robzyc Reply Date: 7/23/2008 6:43:20 AM
Hey Peter

I think "shellshocked" would be a more appropriate word
Just worries me as to how developers turn out based on starts like this!
(of course this is not a flame, it is genuinely a concern of mine!)

Fast forward 3-5 years.. I see maintainence programming being the number 1
cause of death for developers

Rob
http://cantgrokwontgrok.blogspot.com
Reply By: planoie Reply Date: 7/23/2008 11:39:25 AM
I know the feeling.  In the last day, I answer 3 threads from the same user that were nothing by a google query with keywords they posted.  I'm thinking of writing a small addition to the forum code for an "Insert Google Query Stub" feature.

-Peter
compiledthoughts.com
Reply By: robzyc Reply Date: 7/23/2008 11:44:52 AM
Sounds like a great idea! But there's a huge part of me that would rather stop people from asking questions without searching, rather than us pasting back a search, you know?

Side note: Did you see my latest blog post? Based on what you have seen on here, I would love to hear any thought you have

Rob
http://cantgrokwontgrok.blogspot.com
Reply By: imaginationy Reply Date: 7/25/2008 5:05:46 AM
It seems that you can get a release version to make the prog not end so quickly.


Go to topic 73001

Return to index page 1