2 Replies - 1018 Views - Last Post: 28 July 2014 - 09:48 PM Rate Topic: -----

#1 jo5621   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 28-July 14

Display different values from an array into a textbox

Posted 28 July 2014 - 09:10 PM

I need to display values from my array that I get from my textbox 1 into my textbox 2 with the following format:
char[0] "whatever" char[2]
void Button1Click(object sender, EventArgs e)
		{
			string text = BIRTH_DAYW2.Text;
			string [] split = text.Split(new char[] {'/'});
			for(int i = 0; i < split.Length; i++)
			{
				AGEW2.Text += split[i];
				if(char[1]="Ene")
				{
					AGEW2.Text = char[0], "whatever", char[2];
				}
				}



Is This A Good Question/Topic? 0
  • +

Replies To: Display different values from an array into a textbox

#2 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 7245
  • View blog
  • Posts: 24,557
  • Joined: 05-May 12

Re: Display different values from an array into a textbox

Posted 28 July 2014 - 09:20 PM

Did you look at String.Format()?
Was This Post Helpful? 0
  • +
  • -

#3 jo5621   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 28-July 14

Re: Display different values from an array into a textbox

Posted 28 July 2014 - 09:48 PM

View PostSkydiver, on 28 July 2014 - 09:20 PM, said:

Did you look at String.Format()?



Thanks for the advise, finally I got what I need:

string text = BIRTH_DAYW2.Text;
			string [] split = text.Split(new char[] {'/'});
			for(int i = 0; i < split.Length; i++)
			{
				AGEW2.Text = string.Format("{0} whatever {2}", split);

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1