1
Answer

C# 2010 object

dc

dc

11y
1.2k
1

In a C# 2010 desktop application I have the following line of code that gets executed continually from calling a mthod:

Attachment att = helper.createAttachmentFromInput(strExcelLocation);

This method never complains about the 'att' object already existing.  I never set the value to null.

This may not be causing an issue since when the method goes out of scope, the object is destroyed?

Can you tell me if my assumption is correct or not? Can you also explain your answer to me?

Answers (1)