3 ms·
new File().Source("xyz").CopyTo("zyx") is the cleanest I believe, and also the most (real) OO way.
by GarvielLoken 7y ago
new File().Source("xyz").CopyTo("zyx") is the cleanest I believe, and also the most (real) OO way.
- DarkWiiPlayer 7y ago> and also the most (real) OO way. No. Far from it. First of all, what is File in your example? a class? an object? and what does File().Source() return? an object? what does that object represent? If you want it to be OO, you have a File object, to which you send a "copy" message. Depending on how strictly OO you want it to be, it then returns the new file object (or a reference to it).