calling method with two object and store in array of objects
<p>I want to call a method where two parametres are objects (one retrieve Person, one added Person). Then store in array of Person objects and then I can work with both object separatelly.</p>

<p>In method:<br>
I do create object Person and store data in it from retrieve data from database where firstName is "Mediterranean".<br>
And add other row(Person features) and do want to pass it back as well.
But doesn't return objects and straight fail.</p>

<p>Can somebody help me please?</p>

<p>I have something like this:</p>

<pre><code>public Person [] retrievePerson(Person somePerson, Person addRowPerson)
{ 
    .......
    findedPerson = new Person(title, firstName, secondName, city, nationality, letter);
    myTableCreatedPerson = new Person(title, firstName, secondName, city, nationality, letter);
    return retrievePerson(findedPerson, myTableCreatedPerson);
}

//and calling function in different class like that
public void retrievePersonTest() //Create Person in DB directly then Retrieve Person and compare retrieve features with create features then directly delete him from DB
{               
    Person expected = null;
    Person actual = null;
    Person addRowPerson = null;
    Person [] twoPersonArray;
    DBConnect target = new DBConnect();

    try //retrieve Person
    {                    
        twoPersonArray =  target.retrievePerson(expected, addRowPerson); //do not return                  
        twoPersonArray = (Func&lt;Person, Person&gt;)target.retrievePerson(expected, addRowPerson).CreateDelegate(typeof(Func&lt;Person, Person&gt;)); //do not return either
    }
}
</code></pre>
