ProtekNickz
Member
- Joined
- Jan 13, 2022
- Messages
- 14
- Programming Experience
- 5-10
Hi, I've been programming for quite a few years, but only fluctuating in and out of it, with various languages, Here' goes anyway ,
I have created a form with various labels and textboxes and a button, once information is entered in to a textbox then I need to change the text in a multiline code, Example bellow:
Every time I try to add Textbox1.Text to the Multiline code which will be compiled at Runtime, Well it won't compile due to the Textbox1.Text being added, so I cannot compile the information on the fly that is needed, The program is so I can create certain settings in a exe to run on other machines in my network for a project I'm working on, please take note of the @" CODE " as they have to be their so I can place the code in a multiline so I don't have to do each line in a separate string builder code, The reason i would like it in this way is it's easier to edit the code as it's more native to what I see in the main programs form, more human readable.
Yours ProtekNickz.
I have created a form with various labels and textboxes and a button, once information is entered in to a textbox then I need to change the text in a multiline code, Example bellow:
String Manipulate:
@"
using System;
namespace MyProgram
{
class MyStringsProgram
{
static void Main(string[] args)
{
PrintInfomation(false);
}
static void PrintInformation(bool isChecked)
{
if(isChecked)
{
Console.WriteLine(""The Information in"" + Textbox1.Text + "" is Correct!"");
}
else
{
Console.WriteLine(""The Information in"" + Textbox1.Text + "" is Incorrect!"");
}
}
}
}
"
Every time I try to add Textbox1.Text to the Multiline code which will be compiled at Runtime, Well it won't compile due to the Textbox1.Text being added, so I cannot compile the information on the fly that is needed, The program is so I can create certain settings in a exe to run on other machines in my network for a project I'm working on, please take note of the @" CODE " as they have to be their so I can place the code in a multiline so I don't have to do each line in a separate string builder code, The reason i would like it in this way is it's easier to edit the code as it's more native to what I see in the main programs form, more human readable.
Yours ProtekNickz.