Dispose vs Close

In this blog, we will see the differences between Dispose() and Close()

What are the differences between Dispose() and Close()

Dispose() and Close() function for is used to dispose or close SharePoint server objects like SPWeb, SPSite. Purpose of these 2 methods is same.
So which one is better to use?
It is better to call Dispose() instead of Close() why because server objects like SPWeb and SPSite implements the IDisposable interface and standard .Net framework GC calls the Dispose method.

Leave a Comment

RSS
YouTube
YouTube
Instagram