T
T
TheTalion2016-10-24 20:30:37
C++ / C#
TheTalion, 2016-10-24 20:30:37

How to access a sheet through a method?

There is such a file:

public class Server{
public static void Main(string[] args){
var m_list = new List<listList>();

//тут буду вызывать функцию
}}

and a function like this:
public static void SetName(string[] tokens)
    {
      string _name = tokens[1];
      m_list.Add(new listList{ example = _name});//добавить в лист
    }

How can I add this leaf to the function arguments?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Basmanov, 2016-10-24
@TheTalion

Just add a comma, see MSDN for details .

public static void SetName(List<listList> m_list, string[] tokens)
{
    string _name = tokens[1];
    m_list.Add(new listList { example = _name });//добавить в лист
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question