I am new to C#, and I tried to look at the earlier posts but did not find a good answer.
In a C# Windows Form Application with a single form, is using Form.Close()
better or Form.Dispose()
?
MSDN says that all resources within the object are closed and the form is disposed when a Close is invoked. Inspite of which, I have come across several examples online which follow a Dispose rather than a Close.
Does one have an advantage over the other? Under which scenarios should we prefer one over the other?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…