using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Study_string
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string strText = lblText.Text;
lblContain.Text = strText.Contains("Test").ToString();
lblEquals.Text = strText.Equals("Test").ToString();
lblLength.Text = strText.Length.ToString();
lblReplace.Text = strText.Replace("Test", "i Can");
string[] strSplit = strText.Split(',');
lblSplit1.Text = strSplit[0].ToString();
lblSplit2.Text = strSplit[1].ToString();
lblSplit3.Text = strSplit[2].ToString();
lblSubstring.Text = strText.Substring(3,5).ToString();
lblToLwer.Text = strText.ToLower();
lblToUpper.Text = strText.ToUpper();
lblTrim.Text = strText.Trim();
}
}
}
'Window Forms 공부' 카테고리의 다른 글
[Windows Forms] 수학 퀴즈 앱 만들기 (0) | 2024.06.03 |
---|---|
[Windows Forms] 사진 뷰어 앱 만들어보기 (0) | 2024.05.29 |
[Windows Forms] 계산기 만들어보기 (0) | 2024.05.27 |
Windows Forms App과 Windows Forms App (.NET Framwork)의 차이점은 무엇일까? (0) | 2024.05.25 |