Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System; //It's a really simple code
- namespace Project{
- public static class Password {
- public static void Main() {
- Console.WriteLine("Please enter your new password");
- string password = Console.ReadLine(); //I want to make this one public and then use it in the other class..
- Console.WriteLine("Are you sure you want to change your password to: " + password + "? (Yes/No)");
- string input = Console.ReadLine();
- if(input.ToLower() == "yes")
- {
- Console.WriteLine("Your password has been changed to " + password + "!");
- Console.WriteLine("Press any key to continue..");
- Console.ReadKey();
- Console.Clear();
- Username.Name ();
- }
- else if(input.ToLower() == "no")
- {
- Console.WriteLine(password + " will not be saved as your password");
- Console.WriteLine("Press any key to restart");
- Console.ReadKey();
- Console.Clear();
- Main();
- //System.Environment.Exit(0);
- }
- else
- {
- Console.WriteLine("ERROR! Press any key to restart");
- Console.ReadKey();
- Console.Clear();
- Main ();
- }
- }
- }
- public static class Username
- {
- public static void Name ()
- { //And that is here.
- Console.WriteLine("Please enter a username you would like");
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment