توضیح ::
شما باید با عملگر های NOT,And,Or,Xor آشنایی داشته باشید:
مثلا شما اگه بخواید زمانی پیغام Good Work رو بده که یکی از دو تکس باکس ها مقدار 123 رو داشته باشه که از عملگر or استفاده می کنید.
If TextBox1.Text = "123" or TextBox2.Text = "123" Then
MessageBox.Show(" Good Work", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show(" Try again", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
اگه بخواید زمانی پیغام Good Work رو بده که تکس باکس ها مقدارشون 123 رو داشته باشه که از عملگر and استفاده می کنید.
If TextBox1.Text = "123" And TextBox2.Text = "123" Then
MessageBox.Show(" Good Work", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show(" Try again", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
حالت های مختلف and,or,xor
صرفا جهت اطلاع
'''حالت کلی
''' true And true = true
''' true And False = False
''' false and false = false
'''
'''true or true=true
''' true or false=true
''' false or false=false
'''
'''true xor false=true
''' false xor true=true
''' true xor true=false
''' false xor false=false
'''
موفق باشین.&*