Method_1 receives data from the site in the variable "var"
var resultRepo = await client_cur.Search.SearchRepo(request_repo); In the "var resultRepo" there is a collection of objects with properties.
I plan to extract the objects and its properties in the "DataTable", and then display it in the "dataGridView" using pagination.
To implement the above, it is assumed to use the method "Method_2".
Question.
How to transfer "var resultRepo" in "Method_2"?
The code is used from here - link
Preliminary code
public void method_1(string searchQuery_str) { // Поиск по "Репозитариям" request_repo = new SearchRepositoriesRequest(searchQuery_str); // mvc client side framework - Структура клиентской стороны mvc var resultRepo_1 = client_cur.Search.SearchRepo(request_repo); return resultRepo_1; } public void method_2(var resultRepo_1) { var resultRepo_2 = resultRepo_1; } private void button1_Click(object sender, EventArgs e) { string searchQuery_str = textBox1.Text; method_1(searchQuery_str); } private void button2_Click(object sender, EventArgs e) { method_2(resultRepo_1); } 
