StevanovicMilan

Vežba 06, Zadatak 2

Dec 1st, 2017
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.26 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 Vezba_06_2017_Zadatak2
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         public Form1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         private void button1_Click(object sender, EventArgs e)
  21.         {
  22.             string s1 = textBox1.Text;
  23.             string s2 = textBox2.Text;
  24.  
  25.             textBox3.Text = s1.Length.ToString();
  26.             textBox4.Text = s1 + s2;
  27.             textBox5.Text = s1.ToUpper();
  28.             textBox6.Text = s1.ToLower();
  29.  
  30.             textBox9.Text = s1.IndexOf(textBox7.Text).ToString();
  31.             textBox10.Text = s1.LastIndexOf(textBox8.Text).ToString();
  32.  
  33.             textBox11.Text = s1.Substring((int)(numericUpDown1.Value), (int)(numericUpDown3.Value)).ToString();
  34.             textBox12.Text = s1.Remove((int)(numericUpDown2.Value), (int)(numericUpDown4.Value)).ToString();
  35.             textBox13.Text = s1.Replace(textBox14.Text, textBox15.Text);
  36.         }
  37.  
  38.         private void button2_Click(object sender, EventArgs e)
  39.         {
  40.             Close();
  41.         }
  42.     }
Advertisement
Add Comment
Please, Sign In to add comment