PDA

View Full Version : سوال: فرق Or با OrElse؟



zdbdam
پنج شنبه 23 تیر 1390, 00:18 صبح
فرق Or با OrElse چیه؟

If condition [ Or ] condition [ Then ] [ statements ] End If

If condition [ OrElse ] condition [ Then ] [ statements ] End If

zdbdam
پنج شنبه 23 تیر 1390, 01:08 صبح
آقای Carmelo La Monica لطف کرد جوابم داد، جواب رو اینجا هم مینویسم شاید بدرد یه بنده خدایی بخوره:

Hello zdbdam,
education or if it is introduced to evaluate two conditions will be triggered if either is true, as the following faiths.
If Me.TextBox1.Text = "test" OrElse Me.TextBox2.Text = "test1" Then MessageBox.Show("test or") End If
if the value of testbox1.text = test or the value of textbox2.text = test1, the instruction will be executed will be worth real value
However, if you use ORELSE and Expression1 is found to be True then Expression2 is not evaluated.
More information here
http://msdn.microsoft.com/en-us/library/ea1sssb2(VS.71).aspx
Bye