Hey Everyone,
I'm still a relatively new C# programmer but I'd love to help other programmers who may not be familiar with something like this. This is a great way to organize stings in a format where it's easily accessible instead of having to scroll through a bunch of things, it also makes things like text to command easier. Without wasting time here's the format to get started:
To analyze this, we are first declaring the string soandso, after that we are setting a blank value for the string although that is not the purpose. Lastly we are using the array system to link something that's currently non existent 👹. Remember the array system starts with 0.
Let's take up a normal example of this:
Remember since these aren't strings we will still use quotation marks to work with the values.
Now let's use this for user input from a textbox.
That's all. Happy programming everyone.
I'm still a relatively new C# programmer but I'd love to help other programmers who may not be familiar with something like this. This is a great way to organize stings in a format where it's easily accessible instead of having to scroll through a bunch of things, it also makes things like text to command easier. Without wasting time here's the format to get started:
Code
string soandso = String.Format("",blah,blah);To analyze this, we are first declaring the string soandso, after that we are setting a blank value for the string although that is not the purpose. Lastly we are using the array system to link something that's currently non existent 👹. Remember the array system starts with 0.
Let's take up a normal example of this:
Code
string soandso = String.Format("Hi {0} How's it going? It's a {1} day out today huh?", "joe", "nice");Now let's use this for user input from a textbox.
Code
string soandso = String.Format("Hey {0} I'm {1}, I am {2} years old and currently live in {3}.", textbox1.text, textbox2.text, textbox3.text, textbox4.text);That's all. Happy programming everyone.



