ComboBox nesnesi içinden seçilen bir harfin sesli harf mi, sessiz harf mi olduğunu bulan program Csharp C#
gibi tasarlayıp yazınız.
[code language=”csharp”]
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 WindowsFormsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
String harf = comboBox1.Text;
switch (harf)
{
case "B":
case "C":
case "Ç":
case "D":
case "F":
case "G":
case "Ğ":
case "H":
case "J":
case "K":
case "L":
case "M":
case "N":
case "P":
case "R":
case "S":
case "Ş":
case "T":
case "V":
case "Y":
case "Z":
label2.Text = "Seçilen harf sessizdir";
break;
case "A":
case "E":
case "I":
case "İ":
case "O":
case "Ö":
case "U":
case "Ü":
label2.Text = "Seçilen harf seslidir";
break;
default:
label2.Text = "Hatalı giriş yaptınız";
break;
}
}
}
}
[/code]

