reusing-code

Reusing Object does not work properly

Hi guys, I'm reusing a created Object just to change a Date and the ordinal value, but at the end I get 6 objects exactly as the last. in other words, I'm adding the object as a Reference and I should add as a Value What should I inherit my Object to have the Copy() method ? RecurringPayment rp, copy; rp = new RecurringPayment { ...

What are the disadvantages of using inheritance as a way of reusing code?

What are the disadvantages of using inheritance as a way of reusing code? ...

C# IDisposable object for entire class

The project that I'm working on at the moment uses an IDisposable object in every method in a class. It has started getting tedious re-typing the using block at the start of every method, and was wondering if there was a way to specify a disposable variable for use in every method of the class? public static class ResourceItemRepository...