Is there anyway to have the user input the numbers they wish to add in the specific class made for addition instead of already inputted numbers?
User Input Numbers in Created Classes
Page 1 of 15 Replies - 887 Views - Last Post: 21 October 2014 - 11:33 AM
Replies To: User Input Numbers in Created Classes
#2
Re: User Input Numbers in Created Classes
Posted 21 October 2014 - 10:49 AM
Of course there is. If you are making a console application, you can use Console.ReadLine()
If you are making a Windows Forms application, you can use InputBox.
If you are making a Windows Forms application, you can use InputBox.
#3
Re: User Input Numbers in Created Classes
Posted 21 October 2014 - 11:02 AM
rusoaica, on 21 October 2014 - 10:49 AM, said:
Of course there is. If you are making a console application, you can use Console.ReadLine()
I use console.readline a lot in the console applications, which is what I'm mainly learning right now. But where would the console.readline function within the public class?
#4
Re: User Input Numbers in Created Classes
Posted 21 October 2014 - 11:12 AM
You should put in inside your Main method, if it is a console application. If not, put the InputBox in the Load event of your form, or in a button's Click event or wherever you need your input to be placed. You can create a variable and assign its value the result of the Console.ReadLine or InputBox methods.
#5
Re: User Input Numbers in Created Classes
Posted 21 October 2014 - 11:26 AM
Thanks, very helpful.
#6
Re: User Input Numbers in Created Classes
Posted 21 October 2014 - 11:33 AM
You're welcome!
Page 1 of 1

New Topic/Question
Reply


MultiQuote


|