Ok. I have one button and one textbox. Now, user should enter how old he is. I want to make statement that if he is older then 13 some messagebox will popup. Problem is that with VB i know how to do that but in C# its not working on that way. Here is the code I made:
What can be the problem?Code:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { int[] num = {1,2,3,4,5,6,7,8,9,10,11,12,13 }; for (int i = 0 ; i<=13;i++) { if (textBox1.Text > num[i].ToString()) { MessageBox.Show("You are enough old to join us."); } } } } }


Reply With Quote
< Please rate my post if this helped you out. Any kind of thanks is gladly appreciated > 

