Caching objects [modified]
C#
1
Posts
1
Posters
0
Views
1
Watching
-
I wrote a class Cached. When its data is first requested, it runs the stored delegate to initialize the object. With implicit converion I could write something like: Cached cached = new Cached(delegate(ref CsvFile item){...}); ... CsvFile file = cached; The problem is that I cannot do something like "file.Save()"; I have to do file.Data.Save(). Since these objects should behave like normal objects of that type, it should be possible to write file.Save(). Is there any way? (Did I accidentally duplicate some class that .NET BCL already has?) modified on Sunday, March 9, 2008 9:23 AM
modified on Sunday, March 9, 2008 9:25 AM