I have a problem with my script, here it is:
string myOutput = "image.png"; if (myOutput.Contains("youtu.be")) { string statementOutput = "Video ouput"; } else { if (myOutput.Contains(".png")) { string statementOutput = "Image output"; } else { string statementOutput = "Nothing's here"; } } Label1.Text = statementOutput; With code above I get compile time error:
The name 'statementOutput' does not exist in the current context
What I wanna do is, if my string for example have "youtu.be" in the myOutput variable it makes the string "statementOutput" to the value "Video Ouput" and if it contains .png it changes the strings value to "Image Ouput" and if there is nothing in the "myOutput" string, it does nothing.