M
M
Maxim2017-06-03 23:51:54
.NET
Maxim, 2017-06-03 23:51:54

StackOverflowException in properties?

An exception of type 'System.StackOverflowException' was thrown.

public String[] SavesName
        {
            get => SavesName;
            set
            {
                SavesName = value;
                cbSaves.Items.Clear();
                if (value != null) cbSaves.Items.AddRange(value);
            }
        }

Replacing the auto-property, as written on the Internet, does not work. What to do? The property is called "from outside".

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem, 2017-06-03
@Got_Oxidus

Check for infinite recursion.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question