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