Vb.Net,Visual Basic, C sharp, Asp.Net,
https://i.servimg.com/u/f62/15/02/55/31/emrah10.jpg

Join the forum, it's quick and easy

Vb.Net,Visual Basic, C sharp, Asp.Net,
https://i.servimg.com/u/f62/15/02/55/31/emrah10.jpg
Vb.Net,Visual Basic, C sharp, Asp.Net,
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Select Case Kullanımı

Aşağa gitmek

Select Case Kullanımı Empty Select Case Kullanımı

Mesaj  Admin Paz Şub. 21, 2010 3:49 pm

KULLANIMI:
select case seçilen yer
cose koşul1
işlem
case koşul2
işlem
cese else :yuarıdakilerenden hiçbiriyse
işlem
End Select


ÖRNEK:
Bir button, 2 adet textbox ekleyin butona çift tıklayın(click olayına) ve aşağıdaki kodu yazın
Dim a, b, toplam As Integer
a = TextBox1.Text
b = TextBox2.Text
toplam = (a b) / 2

Select Case toplam
Case 1 To 24
MsgBox("geçersiz"&)
Case 25 To 44
MsgBox("Zayıf")
Case 45 To 54
MsgBox("Geçer")
Case 55 To 69
MsgBox("Orta")
Case 70 To 84
MsgBox("iyi")
Case 85 To 100
MsgBox("Pekiyi")
Case Else
MsgBox("100 Den Yukarı sayı not sayılmaz")
MsgBox("21.yy")
End Select

Admin
Admin
Admin

Mesaj Sayısı : 18
Kayıt tarihi : 21/02/10

http://vbnetci.yetkinforum.com

Sayfa başına dön Aşağa gitmek

Sayfa başına dön


 
Bu forumun müsaadesi var:
Bu forumdaki mesajlara cevap veremezsiniz