August 13th, 2008, 01:25 AM
#1
Entering String
Dear All,
I'm quite new at programming with C#. can someone give me example code that I can use to enable a user to enter string characters via keyboard.
the thing is i have to write a hangman game and the user have to guess the word advanced, by typing it. please give me a clu. I am desparate
August 13th, 2008, 01:36 AM
#2
Re: Entering String
you did not say if this is a Console App or WinForm.
Console:
string line;
line = Console.ReadLine();
Win (just use a TextBox):
User can type in text and you can get the text by e.g. "textBox1.text"
August 13th, 2008, 03:27 AM
#3
Re: Entering String
Originally Posted by
MNovy
you did not say if this is a Console App or WinForm.
Console:
string line;
line = Console.ReadLine();
Win (just use a TextBox):
User can type in text and you can get the text by e.g. "textBox1.text"
Please see the attached file, how do incoporate the classes to see the string on screen
Attached Files
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width