Guest User

Untitled

a guest
Feb 4th, 2020
10
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public async Task<string> GetUser()
  2. {
  3.     var result = await GetSomeData();
  4.     return result;
  5. }
  6.  
  7. public bool CheckUser(string user)
  8.     => user == "test";
  9.  
  10. public async void Start()
  11. {
  12.     string user = await GetUser();
  13.     bool currentUser = CheckUser(user);
  14.     if (currentUser) Console.WriteLine("User == test");
  15.  
  16.     // или
  17.     //if (ChechUser(await GetUser()))
  18.     //  Console.WriteLine("User == test");
  19. }
RAW Paste Data