0

我们在 VB.net 项目中使用了 Interop.Scripting.Dll 引用。

我们现在不想在我们的 VB.Net 项目中使用这个 Interop.Scripting.Dll。我们能否获得 Scripting.Dll 的 .Net 对应部分,这样我们就不需要使用旧的脚本 dll 参考来构建我们的 .Net 项目?

我们正在使用 Interop.Scripting.Dll 的 Scripting.FileSystemObject、Scripting.Folder、Scripting.TextStream、Scripting.File 和 Scripting.IOMode.ForWriting。VB.Net 2010 中这些对象的等效 .net 对应物是什么?

如果能提供任何帮助,那就太好了。

谢谢你的建议。

4

1 回答 1

0

A little Googling turned up a discussion that suggested the functionality in this DLL could be replaced by System.IO classes. The functionality is probably spread out a bit among different classes. StreamReader and StreamWriter are used for reading/writing text files. You may also find File and Directory useful for managing files and folders. Path is great for path manipulation. With these classes, you'll usually be using strings for paths instead of having an object.

Basic Tutorials for reading and writing files:

Hopefully, that's enough to at least get you started. Good luck.

于 2013-05-23T06:27:36.417 回答