Advertisement
DrAungWinHtut

Array Test1 in CS

Mar 7th, 2022
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace _2022030201_CS_Array_Tutorial
  12. {
  13. public partial class frmArrayTest1 : Form
  14. {
  15. public frmArrayTest1()
  16. {
  17. InitializeComponent();
  18. }
  19.  
  20. private void btnReadString_Click(object sender, EventArgs e)
  21. {
  22. string sInput;
  23. string[] saData = new string[100];
  24. sInput = txtSinput .Text;
  25.  
  26. saData = sInput.Split('*');
  27.  
  28. txt1.Text = saData[0];
  29. txt2.Text = saData[1];
  30. txt3.Text = saData[2];
  31.  
  32.  
  33. }
  34.  
  35. private void button1_Click(object sender, EventArgs e)
  36. {
  37. string s1=txt1 .Text ;
  38. string s2=txt2.Text ;
  39. string s3=txt3.Text ;
  40. string sFinal = s1 +"*"+ s2 + "*" + s3;
  41. txtSinput .Text = sFinal ;
  42. }
  43.  
  44. private void frmArrayTest1_Load(object sender, EventArgs e)
  45. {
  46.  
  47. }
  48. }
  49. }
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement