<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8434519002014681579</id><updated>2024-11-01T01:19:06.443-07:00</updated><title type='text'>C# Programlama Dersleri</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://csharpprogramci.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8434519002014681579/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://csharpprogramci.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Çağrı Çakoğlu</name><uri>http://www.blogger.com/profile/09595026589852477653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj50hDyuBGb4xgMs1_nz4fEl_IWmHhlcGNlBT2bbLJZCO3a3QU50nikA_-rdNaDE_mmjbxD4vFAl0R-1X7Kj2b_4aaeD-StQfWifWrapYrDQ5aKIul9wGAwzMZaVVN1RA/s1600-r/Logo1.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8434519002014681579.post-3968279646582055012</id><published>2010-03-10T06:10:00.000-08:00</published><updated>2010-03-10T06:24:59.318-08:00</updated><title type='text'>C# Karar Yapıları Switch Case</title><content type='html'>Yeni bir form oluşturuyoruz. ve formumuza bir adet textbox ve button koyalım.Textbox&#39;ın name&#39;ine txt_sayı yazalım.&lt;br /&gt;
&lt;br /&gt;
Buttonun kod satırına&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #9fc5e8;&quot;&gt;private void button1_Click(object sender, EventArgs e)&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int sayi = int.Parse(txt_sayi.Text);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch (sayi)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case 1:&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;1&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case 10:&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;10&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case 20:&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;20&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default:&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;hiçbiri&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;br /&gt;
//Buttona tıklandığında textbox&#39;da yazılan sayıyı kontrol ediyor. Case içine verdiğimiz değer&lt;b&gt;(koşul)&lt;/b&gt; ile uyuyor ise case içine yazdığımız kodları çalıştırıyor. Hıçbir kosul sağlanmadığında defult altına yazdığımız kodlar çalışır.&lt;br /&gt;
&lt;br /&gt;
Bir button,2 radiobutton ve textbox ekliyoruz.Radiobuttonların name&#39;leri rb_ist ve rb_bursa.Text&#39;leri İstanbul ve Bursa.TextBox name txt_ilce.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp; private void button2_Click(object sender, EventArgs e)&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string ilce = txt_ilce.Text.ToLower();&lt;/div&gt;&lt;span style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (rb_ist.Checked == true)&lt;/span&gt;&lt;b&gt;//rb_ist checked özelliğinin true olup olmadığını kontrol ediyoruz.&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #9fc5e8;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #9fc5e8;&quot;&gt;switch (ilce)&lt;/span&gt;&lt;b&gt;//switch ile txt_ilce icine yazılan ilceleri kontrol ediyoruz. Hangi ilce yazıldıysa o ilcenin bölgesini messagebox&#39;da gösteriyoruz&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case &quot;kadıköy&quot;:&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;Anadolu Yakası&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case &quot;beşiktaş&quot;:&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;Avrupa Yakası&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default:&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;Sistemde Kayıtlı Değil&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;span style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (rb_bursa.Checked == true)&lt;/span&gt;&lt;b&gt;//rb_bursanın checked özelliğinin true olup olmadığını kontrol ediyoruz&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9fc5e8;&quot;&gt; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch (ilce)&lt;/span&gt;&lt;b&gt;//switch ile txt_ilce icine yazılan ilceleri kontrol ediyoruz. Hangi ilce yazıldıysa o ilcenin bölgesini messagebox&#39;da gösteriyoruz&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case &quot;çekirge&quot;:&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;Heykel&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case &quot;görükle&quot;:&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;Nilüfer&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default:&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;Sistemde Kayıtlı Değil&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;Lütfen Sehir Seçiniz&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtyxYDjuL6kXGffG1e8xRD-DY-KKlBB-WYigAjgIazbGZliqiPSNPHgiOAwBNQ3zMrKlvHN62_aDr_fsOd8uzjpaNUkkehkaRW5ldZ2l6MGPX5hnkO7nXBXwQqSGn9S2IGZCBVt9yJg0DD/s1600-h/ilcesecim.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtyxYDjuL6kXGffG1e8xRD-DY-KKlBB-WYigAjgIazbGZliqiPSNPHgiOAwBNQ3zMrKlvHN62_aDr_fsOd8uzjpaNUkkehkaRW5ldZ2l6MGPX5hnkO7nXBXwQqSGn9S2IGZCBVt9yJg0DD/s320/ilcesecim.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
//Buttona tıkladığımızda hangi sehir seçilirse texbox&#39;da yazdığımız ilcenin bölgesini gösteriyor. Eğer herhangi bir sehir seçilmez ise sehir seçiniz uyarısı veriyor.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8434519002014681579/posts/default/3968279646582055012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8434519002014681579/posts/default/3968279646582055012'/><link rel='alternate' type='text/html' href='http://csharpprogramci.blogspot.com/2010/03/c-karar-yaplar-switch-case.html' title='C# Karar Yapıları Switch Case'/><author><name>Çağrı Çakoğlu</name><uri>http://www.blogger.com/profile/09595026589852477653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj50hDyuBGb4xgMs1_nz4fEl_IWmHhlcGNlBT2bbLJZCO3a3QU50nikA_-rdNaDE_mmjbxD4vFAl0R-1X7Kj2b_4aaeD-StQfWifWrapYrDQ5aKIul9wGAwzMZaVVN1RA/s1600-r/Logo1.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtyxYDjuL6kXGffG1e8xRD-DY-KKlBB-WYigAjgIazbGZliqiPSNPHgiOAwBNQ3zMrKlvHN62_aDr_fsOd8uzjpaNUkkehkaRW5ldZ2l6MGPX5hnkO7nXBXwQqSGn9S2IGZCBVt9yJg0DD/s72-c/ilcesecim.JPG" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-8434519002014681579.post-8449097540559823763</id><published>2010-03-09T01:37:00.000-08:00</published><updated>2010-03-10T06:22:24.918-08:00</updated><title type='text'>C# Kontroller CheckBox,RaidoButton</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Yeni bir form açıyoruz ve formumuza CheckBox ile Button ekliyoruz.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGrW3tmen0tWnaPu01SifXW7YvNN0oHcr7LjNVbrJ3xkfA7v-wZ6ESo6Wk6MWgqb1AnIg9eRpbBc6_uDBzVR1w_NVZQq3IoPDOFPM-mMNIxIqSnIcGMXqEwgZJTJgiGJuj3vMLoz0R0Zs7/s1600-h/checkbox.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGrW3tmen0tWnaPu01SifXW7YvNN0oHcr7LjNVbrJ3xkfA7v-wZ6ESo6Wk6MWgqb1AnIg9eRpbBc6_uDBzVR1w_NVZQq3IoPDOFPM-mMNIxIqSnIcGMXqEwgZJTJgiGJuj3vMLoz0R0Zs7/s320/checkbox.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div style=&quot;color: yellow;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: yellow;&quot;&gt;&lt;b&gt;CheckBox&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Buttonun kod satırına &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button1_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;if (checkBox1.Checked == true)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(&quot;Seçili&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;else&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(&quot;Seçili Değil&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//If ile checkBox&#39;ın seçili olup olmadığını kontrol ediyoruz&lt;b&gt;(Checked özelliği)&lt;/b&gt;.Checked true ise seçili demektir.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Formumuza 2 Adet radiobutton, bir textbox ve button ekleyelim.Radiobuttonların name&#39;leri rb_bay, rb_bayan ve textlerinde bay, bayan yazsın. textboxin name&#39;i txt_isim. Button&#39;un textinde ise göster yazalım.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHp302A4qKCB3YCBxaO85UIZKn0jYqCq_eOokVj2f2srkaaoIT0dpA1gv_XKNpwNNMnzXnWZmb6gaSTG8-qugb7s45wP14n1gmU2hzTbzL2t_Q2gk8WhF2UOdb4CDk_oQxAQowY25G1gy-/s1600-h/radiobutton.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHp302A4qKCB3YCBxaO85UIZKn0jYqCq_eOokVj2f2srkaaoIT0dpA1gv_XKNpwNNMnzXnWZmb6gaSTG8-qugb7s45wP14n1gmU2hzTbzL2t_Q2gk8WhF2UOdb4CDk_oQxAQowY25G1gy-/s320/radiobutton.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;div style=&quot;color: yellow;&quot;&gt;&lt;b&gt;RadioButton&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Buttonun kod satırına&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button2_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;if (rb_bay.Checked == true)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(txt_isim.Text + &quot; Bey&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;else if (rb_bayan.Checked == true)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(txt_isim.Text + &quot; Hanım&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;else&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(&quot;seçili değil&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//If ile rb_bay&#39;ın checked(seçili) özelliğini kontrol ediyoruz. Eğer True(doğru) ise messagebox&#39;da txt_isim&#39;den gelen değer + bey yazıyoruz.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//Else if&#39;de ise rb_bayan için checked&#39;ı kontrol ediyoruz.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;/Else&#39;de iki durumda sağlanmaz ise(rb_bay veya rb_bayan seçilmez ise) seçili değil messajını gösteriyoruz.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyWCdGp4A2eT4BFEKNxNr9fz1B1qdbv4nk-5HEyjNt-TtI3wmDN_UZJrgrXQslsMMzARGZ6r_3EOjo5WbD82pGWng2d3Pk3fpI1jiskLsOj2yVY3Qn26nSgi8Du9C8sR82LpebAi15_7Ed/s1600-h/raidobuttonsonuc.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyWCdGp4A2eT4BFEKNxNr9fz1B1qdbv4nk-5HEyjNt-TtI3wmDN_UZJrgrXQslsMMzARGZ6r_3EOjo5WbD82pGWng2d3Pk3fpI1jiskLsOj2yVY3Qn26nSgi8Du9C8sR82LpebAi15_7Ed/s320/raidobuttonsonuc.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Formumuza 2 adet checkbox ve bir button ekliyoruz. Checkboxların name&#39;leri cb_ogrenci ve cb_programci, textleri ise Öğrence ve programcı olsun. Button&#39;un text&#39;inde Burs Kontrol yazalım. &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Buttonun kod satırına &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button3_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;if (cb_ogrenci.Checked == true)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;if (cb_programci.Checked == true)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(&quot;kazandınız&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;else&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(&quot;kazanamadınız&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//IF bloğunun içine ayrı bir if daha ekledik. Bu sayede cb_ogrenci      checked durumunda cb_programcı&#39;nın da chehcked olup olmadığını kontrol edebiliyoruz. &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;else if (cb_programci.Checked == true)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(&quot;kazanamadınız&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;else&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(&quot;seçili değil&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//If ile cb_ogrenci ve cb_programcı&#39;nın checked özelliğini kontrol ediyoruz. Eğer ikiside tiklenmis ise kazandınız. Sadece biri tikli ise kazanamadınız uyarısı veriyor. Hiç biri tikli değil ise seçili değil uyarısı veriyor.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHAiX-QuMs4Jp-tH6Zsz5tyFDKMFCPNGZnm_dlzu2YhwO5GoYb2czz1i8gpDp65IkEc2Euo2IsmAHD8flcTfWDMimVZah5zmwOXoyRwEig111YGBfUMXWh_VCBumgaeUXtVZUjnPzzcGw3/s1600-h/burs.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHAiX-QuMs4Jp-tH6Zsz5tyFDKMFCPNGZnm_dlzu2YhwO5GoYb2czz1i8gpDp65IkEc2Euo2IsmAHD8flcTfWDMimVZah5zmwOXoyRwEig111YGBfUMXWh_VCBumgaeUXtVZUjnPzzcGw3/s320/burs.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;color: yellow;&quot;&gt;&lt;b&gt;&amp;amp;&amp;amp; Ve Operatörü&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Yeni bir button ekliyoruz.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9fc5e8;&quot;&gt; private void button4_Click(object sender, EventArgs e)&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (cb_ogrenci.Checked == true &amp;amp;&amp;amp; cb_programci.Checked == true)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;kazandınız&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (cb_programci.Checked == true)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;kazanamadınız&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (cb_ogrenci.Checked == true)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;kazanamadınız&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;secili değil&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//Yukarda yaptığımız burs kazanma örneğnin farklı bir sekilde yapılışı. Burda IF içine yeni bir if yazmaktansa &lt;b&gt;&amp;amp;&amp;amp;(ve operatörü)&lt;/b&gt; ile 2&#39;li seçim durumunu kontrol ediyoruz.&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8434519002014681579/posts/default/8449097540559823763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8434519002014681579/posts/default/8449097540559823763'/><link rel='alternate' type='text/html' href='http://csharpprogramci.blogspot.com/2010/03/kontroller-checkboxraidobutton.html' title='C# Kontroller CheckBox,RaidoButton'/><author><name>Çağrı Çakoğlu</name><uri>http://www.blogger.com/profile/09595026589852477653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj50hDyuBGb4xgMs1_nz4fEl_IWmHhlcGNlBT2bbLJZCO3a3QU50nikA_-rdNaDE_mmjbxD4vFAl0R-1X7Kj2b_4aaeD-StQfWifWrapYrDQ5aKIul9wGAwzMZaVVN1RA/s1600-r/Logo1.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGrW3tmen0tWnaPu01SifXW7YvNN0oHcr7LjNVbrJ3xkfA7v-wZ6ESo6Wk6MWgqb1AnIg9eRpbBc6_uDBzVR1w_NVZQq3IoPDOFPM-mMNIxIqSnIcGMXqEwgZJTJgiGJuj3vMLoz0R0Zs7/s72-c/checkbox.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-8434519002014681579.post-9026715268195312488</id><published>2010-03-03T06:35:00.000-08:00</published><updated>2010-03-10T06:21:57.494-08:00</updated><title type='text'>C# Karar Yapıları, IF-ELSE IF-ELSE Devamı</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;If Else ile ilgili bir kaç örnek daha yapalım.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Yeni bir form açalım, button ve textbox ekleyelim.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Button ve TextBox&#39;un özelliklerine bakalım. Form üzerinde buttona tıklayıp F4 yada sağ tıklayıp Properties dersek sol tarafta Properties penceresinin açıldığını görüceksiniz. burdan buttonun textini tekmi çiftmi ? yapalım.TextBox&#39;ın ise Name özelliğini txt_sayi yapalım.Böylece kod ekranında txt_sayi yazarak çağırabiliriz. Bu bize çok uzun kodlar yazarken isteiğimiz textbox yada diğer nesnelere kolaylıkla ulaşmamızı sağlıyacaktır.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGs3cddHC8w6SmkS6zJ9kc49zxOGtYuWpPml0IVilJvXlV4GJBJMcnxljNH5tdOdcztIz-BABwmrKNyDRYJ_kkqpFz98n5dJdB44m3GOXCFV1qotJTo3tu3bDqMIHFD2DyeIeSWwKMcl6V/s1600/tekcift.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGs3cddHC8w6SmkS6zJ9kc49zxOGtYuWpPml0IVilJvXlV4GJBJMcnxljNH5tdOdcztIz-BABwmrKNyDRYJ_kkqpFz98n5dJdB44m3GOXCFV1qotJTo3tu3bDqMIHFD2DyeIeSWwKMcl6V/s320/tekcift.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button1_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sayi = int.Parse(txt_sayi.Text);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;if (sayi %2 == 0)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(&quot;çift&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;else&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(&quot;tek&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;//NOT:Sayıyı verilen değere bölünce kalanını göstermeye mod almak denir.Mod % operatöri ile alınır. Bir sayıyı 2&#39;ye böldüğümüzde ya 1 kalanını yada 0 kalanını verir. Eğer 1 kalanını veriyor ise o sayı tektir.0 kalanını verir ise sayı çifttir.&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//sayi değiskenine txt_sayi&#39;dan değer alıyoruz. If ile bu sayının mod 2&#39;sinin 0&#39;a esit olup olmadığına bakıyoruz. Eğer esit ise messagebox&#39;da çift yazıyor.Koşul sağlanmadıysa(else) tek yazıyor.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Yeni bir buton ve 2 adet textbox ekleyelim. Butonun textinde Aynımı yazsın. textboxlar ise txt_deger_1 ve txt_deger_2 olsun.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;b style=&quot;color: yellow;&quot;&gt;Bool Değiskeni&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button2_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;string deger1 = txt_deger_1.Text.ToLower();&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;string deger2 = txt_deger_2.Text.ToLower();&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;bool iceriyormu = deger1.Contains(deger2);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;if (iceriyormu == true)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(&quot;Evet&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;else&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(&quot;Hayır&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhINdKye8oRBLfy0_IKTixLFAz8bSFRYudkiMwinV5gKnLCA2Eyr0hqfjN11XX28_Xzailu-yGP_sXsP5amgdqBcUhXBLffn-5zNw1eEuthWbYLIelF31zEs6mSKrCDTcXqq8HSPfR8PLI8/s1600/tekcift2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhINdKye8oRBLfy0_IKTixLFAz8bSFRYudkiMwinV5gKnLCA2Eyr0hqfjN11XX28_Xzailu-yGP_sXsP5amgdqBcUhXBLffn-5zNw1eEuthWbYLIelF31zEs6mSKrCDTcXqq8HSPfR8PLI8/s320/tekcift2.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;//Not Bool değiskeni: Bool değiskeni içinde sadece true ve false barındıran bir değiskendir(0 ve 1 değerini alır).&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;//Not Contains: String fonksiyonunun özelliklerinden biridir. İki değerin içeriklerini kontrol etmekte kullanılır.&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//2 adet string değisken tanımladım.bunların içine txt_deger_1 ve txt_deger_2 deki verileri atadık. ToLower olarak atamamızın sebebi, eğer txt_deger_1 veya 2&#39;ye yazılanlardan biri buyuk harf olur ise sonuz hayır çıkıcaktır. Örneğin txt_deget_1&#39;e osman yazdık, txt_değer_2&#39;de Osman olarak yazarsak hayır cevabını alırdık.ToLower yaptığımız için txt&#39;lerden gelen her değer deger1 ve deger2&#39;ye küçük harf olarak atanacağı için doğru sonuca ulaşabiliriz.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//iceriyormu adında bir bool değisken tanımlıyoruz ve  Constains ile 2 değerin esitliğini sorguluyoruz. Constains esit ise true değeri verir.Değil ise false.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//if ile iceriyormu&#39;nun true olup olmadığını sorguluyoruz. Koşul sağlanırsa messagebox&#39;da evet yazıyor.Sağlanmaz ise hayır.&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8434519002014681579/posts/default/9026715268195312488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8434519002014681579/posts/default/9026715268195312488'/><link rel='alternate' type='text/html' href='http://csharpprogramci.blogspot.com/2010/03/c-karar-yaplar-if-else-if-else-devam.html' title='C# Karar Yapıları, IF-ELSE IF-ELSE Devamı'/><author><name>Çağrı Çakoğlu</name><uri>http://www.blogger.com/profile/09595026589852477653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj50hDyuBGb4xgMs1_nz4fEl_IWmHhlcGNlBT2bbLJZCO3a3QU50nikA_-rdNaDE_mmjbxD4vFAl0R-1X7Kj2b_4aaeD-StQfWifWrapYrDQ5aKIul9wGAwzMZaVVN1RA/s1600-r/Logo1.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGs3cddHC8w6SmkS6zJ9kc49zxOGtYuWpPml0IVilJvXlV4GJBJMcnxljNH5tdOdcztIz-BABwmrKNyDRYJ_kkqpFz98n5dJdB44m3GOXCFV1qotJTo3tu3bDqMIHFD2DyeIeSWwKMcl6V/s72-c/tekcift.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-8434519002014681579.post-4321319976263605412</id><published>2010-03-02T04:33:00.001-08:00</published><updated>2010-03-10T06:20:56.148-08:00</updated><title type='text'>C# Karar Yapıları, IF-ELSE IF-ELSE</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b style=&quot;color: yellow;&quot;&gt;IF ELSE &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Yeni bir form açıyoruz ve içine button ekliyoruz.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;private void button1_Click(object sender, EventArgs e)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;int sayi = 3;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;if (sayi &amp;gt; 2) ;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;MessageBox.Show(&quot;sayı 2&#39;den büyük&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;else&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;MessageBox.Show(&quot;sayi 2&#39;den küçük&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//sayi değiskenine 3 değerini atadık. if yapısı ile sayı değiskeninin 2&#39;den büyük olup olmadığını kontrol ediyoruz. Eğer(if) sayi 2&#39;den büyük ise messagebox&#39;da gösteriyoruz. kosul sağlanmıoyor ise(else) messagebox&#39;dan kosulun sağlanmadığını belirtiyoruz.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Formumuza yeni bir button ve textbox ekleyelim.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;private void button2_Click(object sender, EventArgs e)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;int sayi = int.Parse(textBox1.Text);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;if (sayi &amp;gt; 10)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;MessageBox.Show(sayi + &quot; &amp;gt; &quot; + &quot;10&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;else&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;MessageBox.Show(sayi + &quot; &amp;lt; &quot; + &quot;10&quot;); &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;}&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;}&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//Aynı işlemi sayi değerini textbox&#39;dan alarak yaptık. Yeni bir button ve 2 adet textbox ekliyoruz.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;private void button3_Click(object sender, EventArgs e) &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;{ &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;int sayi1 = int.Parse(textBox2.Text); &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;int sayi2 = int.Parse(textBox3.Text); &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;if (sayi1 == sayi2) &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;{ &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;MessageBox.Show(&quot;sayılar aynı&quot;); &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;} &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;else &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;MessageBox.Show(&quot;sayılar farklı&quot;); &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;} &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//if içine farklı kosullarda ekleyebiliriz. Burda sayi1 ile sayı2&#39;nin esitliğini kontrol ediyoruz&lt;span style=&quot;font-weight: bold;&quot;&gt;(esitlik için 2 tane = kullanmalıyız.Tek adet olursa atamak için kullanılır)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;If içine yazabileceğimiz kosul örnekleri&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;string isim=textBox1.Text;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;if (isim.ToLower() == &quot;ismet&quot;)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;MessageBox.Show(&quot;isimler aynı&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;else&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;MessageBox.Show(&quot;isimler farklı&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;} &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;yada&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;string isim1 = textBox1.Text;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;string isim2 = textBox2.Text;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;if (isim1.ToLower() == isim2.ToLower())&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;MessageBox.Show(&quot;isimler aynı&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;else&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;MessageBox.Show(&quot;isimler farklı&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: yellow; text-align: justify;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;ELSE IF&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Yeni bir button ve textbox olusturalım.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;private void button4_Click(object sender, EventArgs e) { int sayi = int.Parse(textBox4.Text); if (sayi &amp;lt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;MessageBox.Show(&quot;sayi 10&#39;dan kucuk&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;else if (sayi == 10)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;MessageBox.Show(&quot;sayi 10&#39;a esit&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;else&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;MessageBox.Show(&quot;sayi 10&#39;dan küçük&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #33ccff;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//TextBox4&#39;ten sayımızı aldık. If ile kontrol ediyoruz. İlk if&#39;de sayının 10&#39;dan kucuk olup olmadığını kontrol ediyoruz, eğer kosul sağlanıyorsa burayı işleyip diğer kodları yok sayıyor. Kosul sağlanmadığında else if&#39;e bakıyor. Burada sayının 10&#39;a esit olup olmadığını kontrol ediyor. Bu kosul sağlanırsa messagebox işlenir, sağlanmaz ise else&#39;ye geçer ve burayı gösterir.&lt;span style=&quot;font-weight: bold;&quot;&gt;(ilk 2 kosul sağlanmadığı zaman direk else&#39;yi gösteriyor)&lt;/span&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8434519002014681579/posts/default/4321319976263605412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8434519002014681579/posts/default/4321319976263605412'/><link rel='alternate' type='text/html' href='http://csharpprogramci.blogspot.com/2010/03/c-karar-yaplar-if-else-if-else.html' title='C# Karar Yapıları, IF-ELSE IF-ELSE'/><author><name>Çağrı Çakoğlu</name><uri>http://www.blogger.com/profile/09595026589852477653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj50hDyuBGb4xgMs1_nz4fEl_IWmHhlcGNlBT2bbLJZCO3a3QU50nikA_-rdNaDE_mmjbxD4vFAl0R-1X7Kj2b_4aaeD-StQfWifWrapYrDQ5aKIul9wGAwzMZaVVN1RA/s1600-r/Logo1.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-8434519002014681579.post-6440249158793174629</id><published>2010-03-02T04:32:00.003-08:00</published><updated>2010-03-10T06:18:45.414-08:00</updated><title type='text'>C# Kontroller,TextBox</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Yeni bir form açalım ve toolbox&#39;tan bir adet button ve TextBox ekleyelim.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHB8sX7TCJeHw2Lk7e-uIhBCwzTE_fzKOYqbLtfRBEj1hqD-poWCTa1cmkzpMFvh_dlI0-7ejRnF10UwQsXUSNqX1RzQAKw8tE1Br8EBcYq5THdGXD63I35gaEDLXwr2Cs7L7z1Vxgthcz/s1600/textbox.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHB8sX7TCJeHw2Lk7e-uIhBCwzTE_fzKOYqbLtfRBEj1hqD-poWCTa1cmkzpMFvh_dlI0-7ejRnF10UwQsXUSNqX1RzQAKw8tE1Br8EBcYq5THdGXD63I35gaEDLXwr2Cs7L7z1Vxgthcz/s320/textbox.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;b style=&quot;color: yellow;&quot;&gt;TextBox&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Buttonun kod satırına&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button1_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(textBox1.Text);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//MessageBox&#39;da textbox&#39;da yazılanı gösterir.TextBox&#39;ın text özelliği&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;textBox1.Text = &quot;çağrı&quot;;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//textbox&#39;a değer atamak için.Form çalıstırıldığında textbox&#39;da çağrı yazıcaktır.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;string degisken = textBox1.text;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(degisken);&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//MessageBox&#39;da textbox&#39;da yazılanı gösterir.Farklı bir yol.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Yeni Bir buton ve 2 adet textbox olusturalım. Butonnun kod satırına&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;b style=&quot;color: yellow;&quot;&gt;int.Parse()&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button2_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;string sayi1 = textBox2.Text;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;string sayi2 = textBox3.Text;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sonuc = int.Parse(sayi1) + int.Parse(sayi2);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(sonuc.ToString());&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//textBox2&#39;nin textine yazılanı sayi1 degiskenine atadık.Aynı sekilde TextBox3&#39;ün textini sayı2&#39;ye atadık. Sonuç değiskeninde bunları topluyoruz. Dikkat edilmesi gereken, textbox sadece string değerleri alabilir. Toplama islemi yapmamız için bu string ifadeleri int&#39;e çevirmemiz gerekiyor. Bunun için &lt;b&gt;int.Parse( )&lt;/b&gt; komutunu kullanıyoruz. MessageBox&#39;da göstermek için herzaman olduğu gibi int değeri stringe çeviriyoruz.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;TextBox string değer aldığı için Lenght, Substring, IndexOf gibi string fonksiyonlarını textbox içindede kullanabiliriz. Örnek olarak&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(textBox1.Text.Substring(2,1);&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//buttona bastığımızda textbox1&#39;de yazan yazının 2. indexinden sonra 1 karakter gösteren messagebox olusturur.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Yeni bir button ve textbox olusturalım.Buttonun kod satırına&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button3_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int uzunluk = textBox4.Text.Length;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int orta_harf = uzunluk / 2;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;string sonuc = textBox4.Text.Substring(orta_harf, 1);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(sonuc);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//textbox4 içine yazılanın harf sayısını bulduk. Bu harf sayısını 2&#39;ye bölerek ortadaki harfin indexini öğrendik. Substring ile bu indexten sonraki bir harfi sonuc değiskenine atadık. Messagebox ile gösterdik.&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8434519002014681579/posts/default/6440249158793174629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8434519002014681579/posts/default/6440249158793174629'/><link rel='alternate' type='text/html' href='http://csharpprogramci.blogspot.com/2010/03/c-kontrollertextbox.html' title='C# Kontroller,TextBox'/><author><name>Çağrı Çakoğlu</name><uri>http://www.blogger.com/profile/09595026589852477653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj50hDyuBGb4xgMs1_nz4fEl_IWmHhlcGNlBT2bbLJZCO3a3QU50nikA_-rdNaDE_mmjbxD4vFAl0R-1X7Kj2b_4aaeD-StQfWifWrapYrDQ5aKIul9wGAwzMZaVVN1RA/s1600-r/Logo1.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHB8sX7TCJeHw2Lk7e-uIhBCwzTE_fzKOYqbLtfRBEj1hqD-poWCTa1cmkzpMFvh_dlI0-7ejRnF10UwQsXUSNqX1RzQAKw8tE1Br8EBcYq5THdGXD63I35gaEDLXwr2Cs7L7z1Vxgthcz/s72-c/textbox.JPG" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-8434519002014681579.post-5106738585483145451</id><published>2010-03-02T04:32:00.001-08:00</published><updated>2010-03-10T06:17:13.476-08:00</updated><title type='text'>C# Programlama Dersi Başlangıç, Değikenler Üstünde İşlem Yapma</title><content type='html'>&lt;div style=&quot;color: yellow; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Toplama,Çıkarma,Çarpma ve Bölme&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Formumuza yeni bir button oluşturuyoruz.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button2_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sayi1 = 9;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sayi2 = 23;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sonuc = sayi1 + sayi2;MessageBox.Show(sonuc.ToString());&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//int değişkeni içinde bir sayı tanımlıyoruz.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//int değiskeni içinde 2. sayımız.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//int değiskeni içinde tanımladığımız 2 sayıyı topluyoruz&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//Topladığımız sayıları MessageBox içinde gösteriyoruz&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Yeni bir buton olusturup çıkarma işmenine bakalım.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button3_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sayi1 = 9;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sayi2 = 23;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;nt sonuc = sayi1 - sayi2;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(sonuc.ToString());&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//tek fark topla(+) yerine çıkartma(-) yapmamız.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Çaprma işlemi için olusturduğumuz button&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button4_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sayi1 = 9;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sayi2 = 23;int sonuc = sayi1 * sayi2;MessageBox.Show(sonuc.ToString());&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Ve bölme için ayrı bir button.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button5_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sayi1 = 9;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sayi2 = 23;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sonuc = sayi1 / sayi2;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(sonuc.ToString());&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Bu işlemler daha fazla değisken kullanarakda yapabiliriz.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sayi1 = 9;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sayi2 = 23;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sayi3 = 8;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sonuc = sayi1 * sayi2+sayi3;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(sonuc.ToString());&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//Bu sefer dikkat edilmesi gereken aynı matamatikte olduğu gibi çarpma işkeminin önceliği olduğudur. Eğer toplama işlemini önce yapmak istiyorsak ( ) içine almamız gerekiyor.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sayi1 = 9;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sayi2 = 23;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sayi3 = 8;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sonuc = sayi1 * (sayi2+sayi3);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(sonuc.ToString());&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: yellow; text-align: justify;&quot;&gt;String Fonksiyonları.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Length Fonksiyonu.&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Yeni bir button oluşturuyoruz.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button6_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;string isim = &quot;Kerem&quot;;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(isim.Length.ToString());&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//Length fonksiyonu string bir ifadenin karakter sayısını öğrenmemize yarar. Int bir değer olduğu için MessageBox&#39;da ToString ile string&#39;e çeviriyoruz.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: yellow; text-align: justify;&quot;&gt;&lt;b&gt;IndexOf&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Her bir string ifade index değerine sahiptir.Örneğin&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;string isim =&quot;Osman&quot;;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;O:0,s:1,m:2,a:3,n:4 indexsine sahiptir.IndexOF ile bu indexleri öğrenebiliriz.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button7_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;string isim = &quot;Osman&quot;;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(isim.IndexOf(&quot;m&quot;).ToString());&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//IndexOf yazdıktan sonra ( ) içine hangi harfin indexini öğrenmek istiyorsak onu yazıyoruz.Gelen değer int olduğu için ToString ile gösteriyoruz.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE-Hcqctnz4cepddGTjw3qwWLzZHMlqJsBN-Loa-BtvxwhNjW094PdzQJ59ajiomNZgmuTWHZXEdIJwYNfHOSNQJwjHOOTUkCEptrKQfm7avdhs0F1ZSajFwTsjTNEin99X5lLQbSqSBDg/s1600/indexof.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE-Hcqctnz4cepddGTjw3qwWLzZHMlqJsBN-Loa-BtvxwhNjW094PdzQJ59ajiomNZgmuTWHZXEdIJwYNfHOSNQJwjHOOTUkCEptrKQfm7avdhs0F1ZSajFwTsjTNEin99X5lLQbSqSBDg/s320/indexof.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: yellow; text-align: justify;&quot;&gt;&lt;b&gt;LastIndexOf&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;IndexOf en bastaki karakterden sayarak başlar. LastIndexOf ise en sondaki karakterden baslar.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: yellow; text-align: justify;&quot;&gt;&lt;b&gt;Remove&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button8_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;string isim = &quot;Yasemin&quot;;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(isim.Remove(3));&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//Verdiğimiz index numarasından sonraki harfleri göstermez.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: yellow; text-align: justify;&quot;&gt;&lt;b&gt;Substring&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button9_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;string isim = &quot;network academy&quot;;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(isim.Substring(3,7));&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//String ifadede girilen index aralıklarındaki harfleri gösterir.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;//Not: Boşlukta bir karakter olarak tanımlanır.&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: yellow; text-align: justify;&quot;&gt;&lt;b&gt;ToUpper, ToLower&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button10_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;string isim = &quot;Kazım&quot;;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;isim.ToUpper;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(isim);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//string ifadenin harflerini büyük göstermeye yarar.ToLower ise küçük gösterir.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: yellow; text-align: justify;&quot;&gt;&lt;b&gt;ToUpper ile Baş Harfi büyülten Program.&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button11_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;string isim = &quot;çağrı&quot;;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;string buyuk_harf = isim.Substring(0, 1);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;string kalan_harf = isim.Substring(1, 4);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(buyuk_harf.ToUpper() + kalan_harf);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//isim adında string bir değisken tanımladık. buyuk_harf değiskenine isim.Substring ile isim değiskeninin ilk harfini tanımladık. kalan_harf&#39;te ise geri kalan harfleri yine Substring ile tanımladık.MessageBox&#39;da buyuk_harf&#39;i ToUpper ile büyük görünmesini sağladık.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;//Not:+ operatörü MessageBox&#39;da kullanıldığında değiskenleri birleştirmeye yarar.&lt;/b&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8434519002014681579/posts/default/5106738585483145451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8434519002014681579/posts/default/5106738585483145451'/><link rel='alternate' type='text/html' href='http://csharpprogramci.blogspot.com/2010/03/c-programlama-dersi-baslangc-degikenler.html' title='C# Programlama Dersi Başlangıç, Değikenler Üstünde İşlem Yapma'/><author><name>Çağrı Çakoğlu</name><uri>http://www.blogger.com/profile/09595026589852477653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj50hDyuBGb4xgMs1_nz4fEl_IWmHhlcGNlBT2bbLJZCO3a3QU50nikA_-rdNaDE_mmjbxD4vFAl0R-1X7Kj2b_4aaeD-StQfWifWrapYrDQ5aKIul9wGAwzMZaVVN1RA/s1600-r/Logo1.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE-Hcqctnz4cepddGTjw3qwWLzZHMlqJsBN-Loa-BtvxwhNjW094PdzQJ59ajiomNZgmuTWHZXEdIJwYNfHOSNQJwjHOOTUkCEptrKQfm7avdhs0F1ZSajFwTsjTNEin99X5lLQbSqSBDg/s72-c/indexof.JPG" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-8434519002014681579.post-7774046688264687114</id><published>2010-03-02T04:12:00.001-08:00</published><updated>2010-03-04T02:00:47.310-08:00</updated><title type='text'>C# Programlama Dersi Başlangıç, İlk Programımız ve Değişkenlere Giriş</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Merhaba,&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Bloğumda Network Academy&#39;de gördüğüm dersleri anlatmaya çalışacağım.Ayrıntılara girmeden kodlar üzerine bir anlatım olucak. Kodlar Visual Studio üzerinde yazılıcak.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3366ff;&quot;&gt;İlk programımız.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;File, New Project, Windows Form Aplication seçerek formumuzu olusturalım.&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWk5_QrY_WiLihzrIXTDxa6pihAz2JJ3GMjAyJoGRLPqJ8KxANBVDJS-BzTH_xidKFJYmk0UJPOmsekqsOacEPVE_UNzN8XbZPntnRGj_hxSE0cEX7IFztNCbSgYRfZd479QNNxrHWnYlh/s1600-h/newproject.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWk5_QrY_WiLihzrIXTDxa6pihAz2JJ3GMjAyJoGRLPqJ8KxANBVDJS-BzTH_xidKFJYmk0UJPOmsekqsOacEPVE_UNzN8XbZPntnRGj_hxSE0cEX7IFztNCbSgYRfZd479QNNxrHWnYlh/s320/newproject.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Forma toolbox&#39;dan sürükle bırak yaparak bir button olusturalım. Buttona çift tıklayarak kod ekranına geçebiliriz.&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #9fc5e8;&quot;&gt;private void button1_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;Merhaba&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;}&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;//MessageBox.Show program çalıştırıldığında messaj kutusu çıkartmaya&amp;nbsp; yarar. Parantez içinde &quot; &quot; ile yazı yazdığımızda ekranda gösterilir.Programı çalıştırmak için Debug, Star Debugging demeniz yada klavyeden f5&#39;e basmanız gerekiyor.&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAp8wFQrxHpaBbhhkUDop4bupa0x5sM5p9rq19T7Qjcu_3_MLbihor_zoOI9wE_fTLgwRZ8Ko4eQsjC1cmFA7bA7ITAc2rC5Iv_OXWilTuc39AVAXMLYeXvCgTtwwNHZ6kVLnwLahDA-Eb/s1600-h/ilkprogram.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAp8wFQrxHpaBbhhkUDop4bupa0x5sM5p9rq19T7Qjcu_3_MLbihor_zoOI9wE_fTLgwRZ8Ko4eQsjC1cmFA7bA7ITAc2rC5Iv_OXWilTuc39AVAXMLYeXvCgTtwwNHZ6kVLnwLahDA-Eb/s320/ilkprogram.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3366ff; font-size: 130%; font-weight: bold;&quot;&gt;Değiskenler.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3366ff; font-weight: bold;&quot;&gt;String değiskeni.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;String ad,soyad gibi harflerden olusan karakterleri yazabileceğimiz değisken türüdür.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//değisken türü strin. ad değiskenin adı. Çift Tırnak içinde değiskenin içeriğini yazıyoruz&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;string ad = &quot;Çağrı&quot;;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8;&quot;&gt;MessageBox.Show(ad);&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;//Aynı yukardaki örnekte olduğu gibi MessageBox.Show içine yazılanı ekranda gösterir.Ad değiskenin içeriği Çağrı olduğu için ekrana Çağrı yazıcaktır.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: #3366ff; font-weight: bold;&quot;&gt;Int değişkeni.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Int rakamları tutan değişken türümüz.&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sayi = 13;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(sayi.ToString());&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;//string&#39;de olduğu gibi değiskenleri MessageBox.Show içinde gösterebiliriz ama &lt;span style=&quot;font-weight: bold;&quot;&gt;MessageBox sadece string ifadeleri gösterdiği için&lt;/span&gt; Int bir değiskeni stringe çevirmemiz gerekiyor. Bunun için ToString komutunu kullanıyoruz.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;İlk göstericeğimiz değikenler bunlar.Kodların hepsini eklediğimiz button içinde yazıyoruz&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;private void button1_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;{&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(&quot;Merhaba&quot;);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;string ad = &quot;Çağrı&quot;;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(ad);&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;int sayi = 13;&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;MessageBox.Show(sayi.ToString());&lt;/div&gt;&lt;div style=&quot;color: #9fc5e8; text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Program çalıstığında 3 defa MessageBox çıkıcaktır ve ilkinde Merhaba, diğerinde Çağrı ve en sonuncuda 13 yazıcaktır.&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8434519002014681579/posts/default/7774046688264687114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8434519002014681579/posts/default/7774046688264687114'/><link rel='alternate' type='text/html' href='http://csharpprogramci.blogspot.com/2010/03/c-programlama-dersi-baslangc-ilk.html' title='C# Programlama Dersi Başlangıç, İlk Programımız ve Değişkenlere Giriş'/><author><name>Çağrı Çakoğlu</name><uri>http://www.blogger.com/profile/09595026589852477653</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj50hDyuBGb4xgMs1_nz4fEl_IWmHhlcGNlBT2bbLJZCO3a3QU50nikA_-rdNaDE_mmjbxD4vFAl0R-1X7Kj2b_4aaeD-StQfWifWrapYrDQ5aKIul9wGAwzMZaVVN1RA/s1600-r/Logo1.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWk5_QrY_WiLihzrIXTDxa6pihAz2JJ3GMjAyJoGRLPqJ8KxANBVDJS-BzTH_xidKFJYmk0UJPOmsekqsOacEPVE_UNzN8XbZPntnRGj_hxSE0cEX7IFztNCbSgYRfZd479QNNxrHWnYlh/s72-c/newproject.JPG" height="72" width="72"/></entry></feed>