title: Access a class return from another class in C#
body: <p>Hi I am fairly new to coding, I am trying to develop a simple DOTNET console application. The console asks for a username, one gets entered and assigned to the username field in the user class, then the same process for a password, and finally an permissions level given by an int.</p>
  
  <p>There is a method in the user class that returns a string dependant on the int entered for the permissions level. How can I access that string to display it as part of my final string saying who is logged in in the console?</p>
  
  <p>Program.cs</p>
  
  <pre><code>using System;
  
  namespace SmartWaste
  {
      class Program
      {
          static void Main(string[] args)
          {
              System.Console.WriteLine("Enter username:");
              var username = new User ();
              username.UserName = Console.ReadLine();
              System.Console.WriteLine("Enter password:");
              username.Password = Console.ReadLine();
              System.Console.WriteLine("Enter permissions level:");
              var PermissionLevelNumber = int.Parse(Console.ReadLine());
              username.PermissionsLevel(PermissionLevelNumber);
  
              Console.WriteLine($"Logged in as {username.UserName} with {username.Password} and {???PermissionsLevelreturn.string???}access level");       
          } 
      }
  }
  
  </code></pre>
  
  <p>User.cs</p>
  
  <pre><code>
  using System;
  using System.Collections.Generic;
  
  namespace SmartWaste
  {
      public class User 
      {
          public string UserName;
          public string Password;
          public string Permissions;
          public string PermissionsLevel(int permissionslevel)
          {
              if(permissionslevel == 0)
              return "basic";
              if(permissionslevel == 1)
              return "Intermediate";
              if(permissionslevel == 2)
              return "Advanced";
              if(permissionslevel == 3)
              return "Admin"; 
              else
              return "No Permissions set";
  
          }
      }
  }
  
  </code></pre>