Advertisement
Guest User

Untitled

a guest
Jun 30th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.75 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication4
  7. {
  8.     class Program
  9.     {
  10.        enum statusPass {OK, NietOK, Onbekend};
  11.        
  12.        
  13.          
  14.         static void Main(string[] args)
  15.         {
  16.                  string userName;
  17.                  string passWordUser;
  18.                  string passWord = "SHARPSOUND";
  19.                  statusPass InlogStatus;
  20.                  InlogStatus = statusPass.Onbekend;
  21.  
  22.                  Console.Write("Console Asks - Please Enter your Name: ");
  23.  
  24.                  userName = Console.ReadLine();
  25.                  
  26.                  Console.WriteLine("");
  27.                  Console.Write("Console Asks - Please Enter your Password: ");
  28.                  passWordUser = Console.ReadLine();
  29.                  if (passWordUser == passWord)
  30.                  {
  31.                      InlogStatus = statusPass.OK;
  32.                      Console.WriteLine("Welkom bij SoundSharp {0}!", userName);
  33.                  }
  34.                  else
  35.                  {
  36.                      InlogStatus = statusPass.NietOK;
  37.                      Console.WriteLine("Acces denied bij SoundSharp {0}!", userName);
  38.                  }
  39.                  
  40.                  login(InlogStatus);  
  41.  
  42.                  Console.ReadLine();
  43.         }
  44.  
  45.         private static void login(statusPass InlogStatus)
  46.         {
  47.             switch (InlogStatus)
  48.             {
  49.                 case statusPass.OK:
  50.                     Console.WriteLine("Wacht Woord is Okey");
  51.                     break;
  52.                 case statusPass.NietOK:
  53.                     Console.WriteLine("Wacht Woord is niet goed");
  54.                     break;
  55.  
  56.        
  57.             }
  58.  
  59.         }
  60.      }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement