0
Reply

smartphone output reversal (password generator)

Lee Hazelhurst

Lee Hazelhurst

Nov 18 2010 5:15 PM
10.7k

Hi,first of all thank you in advanced for any help with this one, ive only been using c# for a few weeks.  Im using a smartphone device to take an input from a user for a maximum of 5 charcater (example), replace numbers with * and output the password in reverse order, here is what i have thus far:

using
System;
using
System.Linq;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Text;
using
System.Windows.Forms;
namespace
Exercise_6
{
public partial class Form1 : Form
{

public Form1()
{
InitializeComponent();
}
private void menuItem1_Click(object sender, EventArgs e)
{

string password = txtInputPass.Text;
password = password.Replace(
"A", "X");
password = password.Replace(
"E", "X");
password = password.Replace(
"I", "X");
password = password.Replace(
"O", "X");
password = password.Replace(
"U", "X");
password = password.Replace(
"a", "X");
password = password.Replace(
"e", "X");
password = password.Replace(
"i", "X");
password = password.Replace(
"o", "X");
password = password.Replace(
"u", "X");
password = password.Replace(
"0", "Z");
password = password.Replace(
"1", "Z");
password = password.Replace(
"2", "Z");
password = password.Replace(
"3", "Z");
password = password.Replace(
"4", "Z");
password = password.Replace(
"5", "Z");
password = password.Replace(
"6", "Z");
password = password.Replace(
"7", "Z");
password = password.Replace(
"8", "Z");
password = password.Replace(
"9", "Z");
txtGenPass.Text = password;

}
}
}
 
 

 
after searching through the web i cant seem to find/figure the best way to change the above??