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;
using System.Globalization;
namespace Project_Scorps_1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Convert_Click(object sender, EventArgs e)
{
string s = textBox1.Text;
char [] c = new char [s.Length];
for (int i = 0; i < s.Length; i++)
{
if (i % 2 == 0)
{
(s[i].ToString()).ToUpper(CultureInfo.InvariantCulture);
}
if (i % 2 != 0)
{
(s[i].ToString()).ToLower();
}
}
textBox2.Text = s;
}
}
}
This is the code I have so far. textBox1 is the text box you enter your sentance in, and textbox2 is the box that contains the output.
It gives me output that is the same sentence I inputted!