VB 2010 Express - Combining strings and objects
Posted on 2013-05-30
I need to build a string using static text and objects holding variable text. For example:
strCommand = "enc -d -aes-256-cbc -k " & Form1.TextBox2 & " -in ./" & Form1.TextBox1 & " -out ./" & Form1.TextBox3.Text & "Decrypted.txt"
I'm getting the following error: Operator '&' is not defined for types 'String' and "System.Windows.Forms.Textbox'
I think it's an issue using the data in the text box. If that is the case, what is the best method for applying the text in a text box to a variable that I can use throughout the Project and in my string?