Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How do i read in what is inputted into a text box in Visual Studio? Do i need to call a stream? I have the

How do i read in what is inputted into a text box in Visual Studio? Do i need to call a stream? I have the below code, but i keep getting an error. I have a Form1.cs & ProgramTest.cs. I want to read what is written into the enter.txt and convert it to a string that can be read. But i am having trouble trying to have both cs files communicate with each other.

When i did a console application i could use the following bolded code, but this doesnt work with a Visual Studio form. What is the equivalent code to read in text in a form??

pattern = (Console.ReadLine()).ToUpper(); //read user input

Form 1.cs

DISPLAY display;

public Form1() { InitializeComponent(); display = new DISPLAY();

//i want what is inputted through the enter1.text to be read through the inputPattern in program.cs

display.InputPattern();

mydisplay1.Text = display.returnScreenValue(); }

Program.cs

public String inputValue { get; set; }

public String InputPattern() { inputValue = pattern; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions

Question

what is a peer Group? Importance?

Answered: 1 week ago