Twitter Character Limit GUI



TwitterGUI

This is a simple C# program that throws a warning at you if you have entered more than 140 characters, similar to Twitter.

Here's the code!

                            using System;
                            using System.Windows.Forms;

                            namespace TwitterGUUI
                            {
                                public partial class Form1 : Form
                                {
                                    public Form1()
                                    {
                                        InitializeComponent();
                                    }

                                    private void button1_Click(object sender, EventArgs e)
                                    {
                                        const int maxChar = 140;
                                        string inputString;

                                        inputString = txtInput.Text;
                                        int inputChar = inputString.Length;
                                        if (inputChar > maxChar)
                                            lblOutput.Text = "Too Many Characters!";
                                        else
                                            lblOutput.Text = "Tweet Sent!";


                                    }
                                }
                            }