I have a linq2sql datacontext that is being deleted. But when I check for null, I always have a false condition.
DataClasses1DataContext dc = new DataClasses1DataContext();
dc.Dispose();
another code further
if (dc == null) {
}
How can I find out if the datacontext has been deleted?
UPDATE: Let me clarify. I get a datacontext, but sometimes the external code passes an object (which is not null but already located). I need to check if an object exists. I was thinking of something else than trying.
source
share