开发者

C# Add New System.IO To Visual Express 2010

Really 开发者_运维知识库simple question up for grabs.

I'm using Visual Studio Express 2010 and want to use System.IO.FileInfo

How do I add it in so that it is usable in classes?

Thanks.


Add this to using directives at top of file:

using System.IO;

Then simply use like so:

FileInfo fi = new FileInfo(filepath);


FileInfo is defined in mscorlib which will be referenced in any .NET project (it also contains object; you can't do without it), so you don't really need to do anything special. Just add using System.IO; to the top of your code file and FileInfo should be easily available for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜