title: C# Error does not exist in the current context
body: <p>I have the following type of method in one class in my stack:</p>
  
  <pre><code>public void CalculateNewDate(DateTime newDate)
      {
        //datetimecalculations
      }
  </code></pre>
  
  <p>I am trying to call the method from a different class in the stack, and pass in a newDate parameter to get the results of the datetimecalculations.</p>
  
  <p>In the new class within the project, I am calling it like this:</p>
  
  <pre><code>Public void methodName(param,param)
  { foreach loop(param)
      {If item != null)
       DateTime newDate = item.Date.value;
        {
          item.item.date = CalculateNewDate(newDate);
        }
      }
  }
  </code></pre>
  
  <p>I am getting the "The name "CalculateNewDate" does not exist in the current context" error message with an option to generate a method stub. </p>
  
  <p>I do have the correct usings in place for namespace. Any idea why I can not call this method from my other class?</p>
  
  <p>Sorry I can not be much more specific than that due to restrictions on what we post publically.</p>