且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我如何将Vbscript转换为C#

更新时间:2023-02-07 22:59:04

ADO.Connection和ADO.Recordset的等价物是使用ado.net。



了解ADO.NET的初学者教程 [ ^ ]



而不是filesystemobject,来检查如果存在文件,请使用 File.Exists [ ^ ]



而不是CDO,要发送电子邮件,请使用System.Net.Mail.MailMessage [ ^ ]



现在只需使用上面的组件重写脚本。
The equivalent for the ADO.Connection and ADO.Recordset is to use ado.net.

A Beginner's Tutorial for Understanding ADO.NET[^]

Rather than filesystemobject, to check if a file exists use File.Exists[^]

Rather than CDO, to send an email message use System.Net.Mail.MailMessage[^]

Now just re-write the script using the components above.