code_junkie

Programming to an interface - Use them for a security class

Nov 13th, 2011
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. //Defined Classes
  2. class UserType1 : SecurityInterface
  3. class UserType2 : SecurityInterface
  4. class UserType3 : SecurityInterface
  5.  
  6. //Use classes
  7. SecurityInterface authentication = GetCorrectUserTypeObject(); //the methds gets the correct UserType object base on who is supposed to authenticate.
  8.  
  9. authentication.DoAuthenticate();
Add Comment
Please, Sign In to add comment