What im and trying to do is take the first four letters of a last name and the first letter in the first name which are in a textbox to use for a user name that im trying to generate but how do i go about doing this is very i unclear to me.If you need more info let me know, this is what i have so far:
public partial class Create_Participant : Form
{
public Create_Participant()
{
string name, address, city, state, chapNum, PType;
name = txtName.Text;
address = txtAddress.Text;
city = txtCity.Text;
state = txtState.Text;
chapNum = txtChapNum.Text;
InitializeComponent();
if (radAdvisor.Checked == true)
{
PType = "a";//Advisor
}
else if (radGuest.Checked == true)
{
PType = "g";//Guest
}
else if (radMember.Checked == true)
{
PType = "m";//Member
}
else
{
MessageBox.Show("Participant type is required.", "Create Participant");
}
string[] Name = {txtName.Text};
for(int i = 0; i < name.Length; i++)
{
name[i] =
}
StreamWriter Guests = new StreamWriter("Guests Registered.txt");
Guests.WriteLine("+" + name + "\r\n-a" +
}
}