idisposable
Duck typing in the C# compiler
Note This is not a question about how to implement or emulate duck typing in C#... For several years I was under the impression that 开发者_开发百科certain C# language features were depdendent on data[详细]
2023-03-13 19:53 分类:问答What is the recommended way to guard against resource leaks in the context of ThreadAbortException?
I\'m working on improving the exception-safety of a piece of code and I realized that a raised ThreadAbortException may cause undesired resource leaks, even when guarding resources with the C# using c[详细]
2023-03-11 21:02 分类:问答Using 'using' with threading utilities in C# - when is Dispose called?
I am developing some utilities to control threading for a game server and am experimenting with using an IDisposable \"token\" so that I can use code like this:[详细]
2023-03-11 08:33 分类:问答Cleaning up with IDisposable issues
I am trying to call these functions to get rid of stuff I don\'t need, but my code seems to be defeating me in what I am begining to perceive to be a vain struggle. I have tried multiple ways to solve[详细]
2023-03-10 13:42 分类:问答How to Dispose() when class is running an async loop? Wait for loop to exit?
I have a class that asynchronously calls a method which contains a loop.This loop will run until the class is disposed.When implimenting Dispose() I already have the ability to tell the loop to stop ([详细]
2023-03-10 06:05 分类:问答When is it reasonable to check if this object has been disposed and throw ObjectDisposedException?
In a class that implements IDisposable, when is it reasonable to check if the object has been disposed 开发者_JS百科and throw ObjectDisposedException if it has? In all public methods and properties (e[详细]
2023-03-08 22:48 分类:问答Garbage Colletion with IDisposable
I was talking with a person about using() statement. He said if we do NOT use using() statement for something like a StreamWriter, if any exception happens, the resource will NEVER get collected.[详细]
2023-03-08 20:28 分类:问答Proper IntPtr use in C#
I think I understand the use of IntPtr, though I\'开发者_Python百科m really not sure. I copied the IDisposable pattern from MSDN just to see what I could get from it, and while I understand it for t[详细]
2023-03-07 13:13 分类:问答Details about inheriting IDisposable?
I\'ve been tasked with going through some old code at work to clean it up and I stumbled across a class:[详细]
2023-03-07 06:22 分类:问答Which .NET Framework classes implement IDisposable
Seems like this has to be documented somewhere but I\'m not finding is anywhere.Perhaps my Google-fu is 开发者_如何学Goweakening.You realize that this will depend on what you call .NET Framework class[详细]
2023-03-06 08:46 分类:问答