D
D
Dmitry2021-08-11 18:07:22
C++ / C#
Dmitry, 2021-08-11 18:07:22

Please explain what the ref and out modifier is for?

In Troelson's book, which I started reading, I did not fully understand why these modifiers (ref, out) are needed at all. So if possible, give a small example of how they are used, along with an explanation of why they are needed. Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2021-08-11
@roflanPominki

Everything is very well described in the
docs https://docs.microsoft.com/ru-ru/dotnet/csharp/lan...
https://docs.microsoft.com/ru-ru/dotnet/csharp/lan...
Try it.
If you still don't understand, come back.)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question