Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Intellisense in WITH ... ENDWITH
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01550535
Message ID:
01550675
Views:
51
>I first thought so too, but Using is a different command than WITH and has to do with garbage collection. When using USING in C#, you still have to mention the variable, a simple dot would not work.

I was not clear, I was talking about the using directive not the using statement. ie
using System.Globalization;
using System.IO;
using System.Net;
using System.Data;

.....

/* Now later you have code like this /*

                 StreamReader reader = new StreamReader(responseStream);
                 string lastFolder = new DirectoryInfo(TargetFolder).GetFileSystemInfos().OrderBy(fi => fi.Name).Last().Name;
So as I said it is not the same as WITH in foxpro, but a similar concept which now begs the question, from where does StreamReader comes from? and DirectoryInfo? Yes, if you know all this namespaces you are dandy, but it is not always the case (the other way around with me :) and that without getting into collisions. No gain in speed at all, no gain in legibility (a loss in fact IMO) and a marginal gain in documentation (you can quickly see what namespaces the code is using) so why is it so widely used? There is where I make the connection with FoxPro's WITH statement.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform