idisposable
Disposing of unmanaged objects in c#
Let\'s say I have a class that has a MyCustomDatabaseAccess as a data member. MyCustomDatabaseAccess has a Dispose() method. MyCustomDatabaseAccess is the middleware class that accesses the database.[详细]
2023-01-29 18:17 分类:问答Deal (Dispose) with Bitmap and Steam when uploading and resize image to server VB.net
My codes: Public Function HandleImageUpload(ByVal serverPath As String, ByVal iWidth As Integer, ByVal iHeight As Integer) As String[详细]
2023-01-29 17:15 分类:问答How pass delegate to a method, where delegates are non static?
I\'m just beginning understanding delegates, I have a class that implemens IDisposable: public class MyClass : IDisposable[详细]
2023-01-29 02:30 分类:问答Closing a file without using using
I have a class which reads data from one file stream and writes to another. I am concerned about closing the streams after the processing has finished in closeFiles().[详细]
2023-01-27 22:45 分类:问答I don't quite understand the workings of using/Disposable objects
I asked a question regarding returning a Disposable (IDisposable) object from a function, but I thought that I would muddle the discussion if I raised this question there.[详细]
2023-01-26 08:16 分类:问答Return a Disposable object for use in a using block
How do I return a disposable object in my function to ensure that it works properly within a using block?In my function, I want to act on the disposable object and also account for errors, which compl[详细]
2023-01-25 16:02 分类:问答C# Using IDisposable to clean up temp files
I have a FileUploader class that can optionally be given a zip file which it extracts to a temporary location and returns the file paths.开发者_JAVA技巧[详细]
2023-01-23 10:17 分类:问答closing connections within a using block
On reading lots of开发者_StackOverflow社区 code, I find that a given Connection object, which implements IDisposable, is is manually closed within a using statement. I see this when I see code related[详细]
2023-01-23 03:23 分类:问答Who should call Dispose on IDisposable objects when passed into another object?
Is there any guidance or best practices around who should call Dispose() on disposable objects when they have been passed into another object\'s methods or constuctor?[详细]
2023-01-23 01:36 分类:问答Timer and IDisposable - Extra protection in Dispose?
I have a class that creates and uses a System.Threading.Timer, something like this: using System.Threading;[详细]
2023-01-22 23:50 分类:问答