Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Intellisense in WITH ... ENDWITH
Message
From
17/08/2012 17:04:46
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01550535
Message ID:
01550687
Views:
54
You need to add appropriate references to the project. (.Net assemblies or other projects). The namespaces and classes are in there.


>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.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform