When writing
Console.Write(new Class().Work)
Does ‘new class` still generates a reference ?
What will be the value on the stack ? (address)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That is: newobj, callvirt, call
Yes, an object is created – the reference is on the stack, and is consumed by the callvirt (leaving the return value of the method for call)
No variable is required, although it would be just as legal with one.