internal static void Demo() { //using (var src = new ResourceHog("source")) //{ // using (var dest = new ResourceHog("destination")) // { // dest.CopyFrom(src); // } // Console.WriteLine("After closing destination block"); //} //Console.WriteLine("After closing the source block"); // you can refactor to: using (var src = new ResourceHog("source")) using (var dest = new ResourceHog("destination")) dest.CopyFrom(src); Console.WriteLine("After closing destination block"); Console.WriteLine("After closing the source block"); }
internal void CopyFrom(ResourceHog source) { }