title: Passing data to a boolean method in another class and handling the response
body: <p>I have a boolean method I am trying to pass a decimal to, then based on some criteria for the received decimal return a boolean value. When passing a value to <code>Account.Deposit</code> I get the error:</p>
  
  <blockquote>
    <p>An object reference is required for the non-static field, method, or property 'Account.Deposit(decimal)'</p>
  </blockquote>
  
  <p>This is the method handling user input and then passing values onto my check/action method:</p>
  
  <pre><code>namespace BankApp
  {
      public class DepositLogic
      {
          public void DoDeposit()
          {
              Console.Write("Please enter the amount you would like to deposit:");
              decimal DepositAmount;
              DepositAmount = Convert.ToDecimal(Console.ReadLine());
              bool response;
              response = Convert.ToBoolean(Account.Deposit(DepositAmount));
          }
      }
  }
  </code></pre>
  
  <p>This is the boolean method that is intended to return a <code>true</code>/<code>false</code> value to the method above as well as alter the balance variable based on input from the <code>DoDeposit</code> method</p>
  
  <pre><code>namespace BankApp
  {
      public class Account
      {
          private Decimal _balance;
  
          public bool Deposit(decimal amountToAdd)
          {
              if(amountToAdd &gt; 0)
              {
                  _balance = _balance + amountToAdd;
                  return true;
              }
              return false;
          }
      }
  }
  </code></pre>
  
  <p>My aim is to have a user enter an amount to "Deposit", that amount be passed to my <code>Account.Deposit</code> method, the balance variable be updated. Then a boolean value gets returned to alert the user if the action was successful/unsuccessful.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>If I instantiate my account in a different class, is it still possible to access it? Here is where my account is instantiated at the moment.</p>
  
  <pre><code>namespace BankApp
  {
      public class Program
      {
          public static void Main()
          {
              Account account = new Account("Suriya's Account", 100000);
          }
      }
  }
  </code></pre>