title: Access a variable outside the method in objective-c
body: <p>I have this function that is storing the contents of an array in three different variables. My question is how can I access to the contents stored in _company.address from another function in the same class.</p>
  
  <pre><code>-(NSArray *) csvArray2CompaniesArray:(NSArray *) csvArray
  {
      int i=0;    
  
      NSMutableArray *ma = [[NSMutableArray alloc] init];
  
      for (NSArray * row in csvArray)
      {
          if (i&gt;0)
          {
              Company *_company = [[Company alloc] init];
  
              _company.name = [row objectAtIndex:0];
              _company.address = [row objectAtIndex:1];
              _company.telephone = [row objectAtIndex:2];
  
              [ma addObject:_company];
          }
          i++;
      }
      return (NSArray *) ma;
  }
  </code></pre>
  
  <p>Thank you in advance.</p>