Answer the question
In order to leave comments, you need to log in
How does ToString() work?
ToString() method of Object, how is it that ToString() knows about the child class and outputs its name? and even if I bring it to object the behavior does not change?
public class TEST
{
}
Console.WriteLine(test.ToString()); //TEST.Program+TEST
Console.WriteLine((object)test.ToString()); //TEST.Program+TEST
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question