simple code hopefully??

  • Thread starter Thread starter tindog
  • Start date Start date
T

tindog

I am brand new to this programming especially C#. I am confused (at the
moment). I have bought two books to get started to learn C# language and
Visual C#.net 2003 in 24 hours. Which is the best to learn the straight
language or the VS techniques??? I am using VS2005 team suite, but have come
to a halt as confused think I am jumping ahead too quickly. I have done a
lovely form for my PDA but is useless as does not do anything, would like
some suggestion for code. I have a form with one button and three text
boxes. The aim is to put a value into box one and a value into box two and
after press button (calculate) and answer is given is a simple division
between value one and two and out put goes into box 3. I have tried to find
examples in my book but get more confused, can someone help with code??

Cheers
Barry
 
Ha ha - yeah it's easy to create a window or a dialogue box - but the
cruncher is that it doesn't really do anything. If you are interesting in
C#, learn the language. If it is a 24 hr book they probably will walk you
step-by-step through some IDE [probably Visual Studio] anyway. But you have
to learn a language to use these IDEs .. learning the IDE comes as you write
out the program examples in the books. Jump in.
 
Thanks for prompt reply. Simple code is all I need at the moment this may
give me assistance in conjunction with your references. If I want to expand
form eg put in another box and combine formulas etc. I am a Registered Nurse
and am trying to do simple drug calcs (can do it manually or with a
calculator) but got ahead of myself and decided to design something quite
useless without associated code. Thanks again for advice.
 
Good advise also.
Cheers
Barry
Carpet Crawler said:
Ha ha - yeah it's easy to create a window or a dialogue box - but the
cruncher is that it doesn't really do anything. If you are interesting in
C#, learn the language. If it is a 24 hr book they probably will walk you
step-by-step through some IDE [probably Visual Studio] anyway. But you
have
to learn a language to use these IDEs .. learning the IDE comes as you
write
out the program examples in the books. Jump in.
 
Barry,

Personally, I don't think those 24-hour books (or 21-day books) are
worth beans. If I were you I'd get O'Reilly's Learning C#, Programming
C#, and their C# Cookbook. Those three are pretty much all you'll need
for the next year or so. I have them all and they're all worth it.
Read Learning C# from front to back like a book, and you'll have a great
start.

You should also learn what you can about Object Orientation, if you
don't know about objects already. There are probably some OO books out
there that use Java in their examples, but those should be fine since
Java and C# use almost exactly the same syntax style. OO is a
fundamental concept, and once you understand that, C# (and Java) will
become much easier.
 
tindog said:
I am brand new to this programming especially C#. I am confused (at the
moment). I have bought two books to get started to learn C# language and
Visual C#.net 2003 in 24 hours. Which is the best to learn the straight
language or the VS techniques??? I am using VS2005 team suite, but have
come to a halt as confused think I am jumping ahead too quickly. I have
done a lovely form for my PDA but is useless as does not do anything, would
like some suggestion for code. I have a form with one button and three text
boxes. The aim is to put a value into box one and a value into box two and
after press button (calculate) and answer is given is a simple division
between value one and two and out put goes into box 3. I have tried to find
examples in my book but get more confused, can someone help with code??

Cheers
Barry

The advice the others have given you is teh correct advice, but just do you
can get your form working ...

double d1 = double.Parse(textbox1.Text);
double d2 = double.Parse(textbox2.Text);

textbox3.Text = (d1 / d2).ToString();

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
 
some sound advice thanks I will look into them as I certainly am very
interested in C# and programming for fun.

Barry
 
tindog said:
some sound advice thanks I will look into them as I certainly am very
interested in C# and programming for fun.

If you're *that* new (like I am) you should read Programming in the Key
of C# by Charles Petzold as your first book. It's amazing, and it's
ideal for anyone who really needs C# explained from the ground up. I
read it first, and then it made all the other books so much clearer than
they would have been otherwise (Programming C#, Murach's C#, etc. etc.)
 
Thank you for code Richard,
Now I really am going to show my ignorance
double d1 = double.Parse(textbox1.Text); \\ goes inbetween braces in texbox1
code??.
double d2 code goes in textbox2 between braces??
and code showing formula goes in text box three between braces thus doing
away with the calc button?? I have purposely left designations as textbox1
etc. so titles are not wrong but when debug is used comes back with name d1
does not exist nor d2 name does not exist.


Barry

"Richard Blewett [DevelopMentor]" <richard at nospam dotnetconsult dot co
dot uk> wrote in message news:[email protected]...
 
John,
Yes I am That New. I will check out a review sound like a good answer. I
definately am having trouble with learn C# in "21 Days or 24 Hour formats"

Barry
 
John,
Was that title as you stated and second part was A PRIMER FOR ASPIRING
PROGRAMMERS??? If it is I will order through Angus and Robertson here in
Australia (Says has a backlog so may be a while before I can get it)....
 
tindog said:
John,
Was that title as you stated and second part was A PRIMER FOR ASPIRING
PROGRAMMERS??? If it is I will order through Angus and Robertson here in
Australia (Says has a backlog so may be a while before I can get it)....

Yes, that's the full title. Definitely get it, you'll learn so much! I
sure did!
 
tindog said:
Thank you for code Richard,
Now I really am going to show my ignorance
double d1 = double.Parse(textbox1.Text); \\ goes inbetween braces in
texbox1 code??.
double d2 code goes in textbox2 between braces??
and code showing formula goes in text box three between braces thus doing
away with the calc button?? I have purposely left designations as textbox1
etc. so titles are not wrong but when debug is used comes back with name
d1 does not exist nor d2 name does not exist.


Barry

"Richard Blewett [DevelopMentor]" <richard at nospam dotnetconsult dot co
dot uk> wrote in message news:[email protected]...
The advice the others have given you is teh correct advice, but just do
you can get your form working ...

double d1 = double.Parse(textbox1.Text);
double d2 = double.Parse(textbox2.Text);

textbox3.Text = (d1 / d2).ToString();

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

No, all the code goes in the button click event handler (the code you want
to execute when you click the button).

Regards

Richard Blewett - DevelopMentor http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
 
Thank you Richard (very much),
All worked out okay with your guidance I have even added a few more
parameters for more complex calculations. I definately will be reading some
of the easy follow programming books that have been mentioned to me plus
websites.

Cheers
Barry (avid follower of this newsgroup)
Long live C#

"Richard Blewett [DevelopMentor]" <richard at nospam dotnetconsult dot co
dot uk> wrote in message news:[email protected]...
tindog said:
Thank you for code Richard,
Now I really am going to show my ignorance
double d1 = double.Parse(textbox1.Text); \\ goes inbetween braces in
texbox1 code??.
double d2 code goes in textbox2 between braces??
and code showing formula goes in text box three between braces thus doing
away with the calc button?? I have purposely left designations as
textbox1 etc. so titles are not wrong but when debug is used comes back
with name d1 does not exist nor d2 name does not exist.


Barry

"Richard Blewett [DevelopMentor]" <richard at nospam dotnetconsult dot co
dot uk> wrote in message news:[email protected]...
I am brand new to this programming especially C#. I am confused (at the
moment). I have bought two books to get started to learn C# language and
Visual C#.net 2003 in 24 hours. Which is the best to learn the straight
language or the VS techniques??? I am using VS2005 team suite, but have
come to a halt as confused think I am jumping ahead too quickly. I have
done a lovely form for my PDA but is useless as does not do anything,
would like some suggestion for code. I have a form with one button and
three text boxes. The aim is to put a value into box one and a value
into box two and after press button (calculate) and answer is given is a
simple division between value one and two and out put goes into box 3. I
have tried to find examples in my book but get more confused, can
someone help with code??

Cheers
Barry


The advice the others have given you is teh correct advice, but just do
you can get your form working ...

double d1 = double.Parse(textbox1.Text);
double d2 = double.Parse(textbox2.Text);

textbox3.Text = (d1 / d2).ToString();

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

No, all the code goes in the button click event handler (the code you want
to execute when you click the button).

Regards

Richard Blewett - DevelopMentor http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
 
Back
Top