把VBScript的函数迁移到C#.NET
| VBScript 5.6 Functions | C# code |
| Abs | System.Math.Abs |
| Array | New Object() { } |
| Asc, AscB, AscW | Microsoft.VisualBasic.Strings.Asc |
| Atn | System.Math.Atan |
| CBool | System.Convert.ToBoolean |
| CByte | System.Convert.ToByte |
| CCur | System.Convert.ToDecimal |
| CDate | System.Convert.ToDateTime * |
| CDbl | System.Convert.ToDouble |
| Chr | (char) |
| CInt | System.Convert.ToInt32 |
| CLng | System.Convert.ToInt64 |
| Cos | System.Math.Cos |
| CreateObject | CreateObject or New Instance in .NET |
| CStr | System.Convert.ToString |
| Date | DateTime.Today |
| DateAdd | Microsoft.VisualBasic.DateAndTime.DateAdd |
| DateDiff | Microsoft.VisualBasic.DateAndTime.DateDiff |
| DatePart | Microsoft.VisualBasic.DateAndTime.DatePart |
| DateSerial | Microsoft.VisualBasic.DateAndTime.DateSerial |
| DateValue | Microsoft.VisualBasic.DateAndTime.DateValue |
| Day | Microsoft.VisualBasic.DateAndTime.Day |
| Eval | (Does not support) |
| Exp | System.Math.Exp |
| Filter | Microsoft.VisualBasic.Strings.Filter |
| Fix | Microsoft.VisualBasic.Conversion.Fix |
| FormatCurrency | Microsoft.VisualBasic.Strings.FormatCurrency |
| FormatDateTime | Microsoft.VisualBasic.Strings.FormatDateTime |
| FormatNumber | Microsoft.VisualBasic.Strings.FormatNumber |
| GetLocale | Session.LCID |
| GetObject | Microsoft.VisualBasic.Interaction.GetObject |
| GetRef | (Does not support) |
| Hex | Microsoft.VisualBasic.Conversion.Hex |
| Hour | Microsoft.VisualBasic.DateAndTime.Hour |
| InputBox | Microsoft.VisualBasic.Interaction.InputBox |
| InStr, InstrB | Microsoft.VisualBasic.Strings.InStr |
| InStrRev | Microsoft.VisualBasic.Strings.InStrRev |
| Int | Microsoft.VisualBasic.Conversion.Int |
| IsArray | Microsoft.VisualBasic.Information.IsArray |
| IsDate | Microsoft.VisualBasic.Information.IsDate |
| IsEmpty | Microsoft.VisualBasic.Information.IsEmpty |
| IsNull | System.Convert.IsDBNull |
| IsNumeric | Microsoft.VisualBasic.Information.IsNumeric |
| IsObject | * |
| Join | Microsoft.VisualBasic.Strings.Join |
| LBound | Microsoft.VisualBasic.Information.LBound |
| LCase | System.String.ToLower |
| Left, LeftB | System.String.Substring(0,..) |
| Len, LenB | System.String.Length |
| LoadPicture | * |
| Log | System.Math.Log |
| LTrim | System.String.TrimStart |
| Mid, MidB | System.String.Substring |
| Minute | Microsoft.VisualBasic.DateAndTime.Minute |
| Month | Microsoft.VisualBasic.DateAndTime.Month |
| MonthName | Microsoft.VisualBasic.DateAndTime.MonthName |
| MsgBox | Microsoft.VisualBasic.Interaction.MsgBox |
| Now | System.DateTime.Now |
| Oct | Microsoft.VisualBasic.Conversion.Oct |
| Replace | Microsoft.VisualBasic.Strings.Replace |
| RGB | Microsoft.VisualBasic.Information.RGB |
| Right, RightB | System.String.Substring |
| Rnd | Microsoft.VisualBasic.VBMath.Rnd |
| Round | System.Math.Round |
| RTrim | System.String.TrimEnd |
| ScriptEngine | * |
| ScriptEngineBuildVersion | * |
| ScriptEngineMajorVersion | * |
| ScriptEngineMinorVersion | * |
| Second | Microsoft.VisualBasic.DateAndTime.Second |
| SetLocale | * |
| Sgn | System.Math.Sign |
| Sin | System.Math.Sin |
| Space | new String(' ',...) |
| Split | Microsoft.VisualBasic.Strings.Split |
| Sqr | System.Math.Sqrt |
| StrComp | System.String.Compare |
| String | New String() |
| StrReverse | Microsoft.VisualBasic.Strings.StrReverse |
| Tan | System.Math.Tan |
| Time | Microsoft.VisualBasic.DateAndTime.TimeOfDay |
| Timer | Microsoft.VisualBasic.DateAndTime.Timer |
| TimeSerial | Microsoft.VisualBasic.DateAndTime.TimeSerial |
| TimeValue | Microsoft.VisualBasic.DateAndTime.TimeValue |
| Trim | System.String.Trim |
| TypeName | Microsoft.VisualBasic.Information.TypeName |
| UBound | Microsoft.VisualBasic.Information.UBound |
| UCase | System.String.ToUpper |
| VarType | Microsoft.VisualBasic.Information.VarType |
| Weekday | Microsoft.VisualBasic.DateAndTime.Weekday |
| WeekdayName | Microsoft.VisualBasic.DateAndTime.WeekdayName |
| Year | Microsoft.VisualBasic.DateAndTime.Year |
把VBScript的函数迁移到C#.NET的更多相关文章
- VBScript常用函数
VBScript常用函数 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 1.Abs函数 Option Explicit '@author :yinzhengjie 'blog:ht ...
- 被弃用的php函数以及被那个代替
原文链接 http://blog.csdn.net/a11085013/article/details/8937848 下面列举了部分被弃用的函数: call_user_method ...
- 数据库迁移expdp impdp 与 OGg 搭建
1.long 字段的无法使用OGG 同步 2.clob字段的导入导出Bug , 生产使用network-link 导入导出太慢了,本地导入导出速度会快3到4倍 .但是测试环境的情况却相反 测试环境和生 ...
- 18 行 JS 代码编一个倒时器
有时候在生活中,你需要一个JavaScript倒计时时钟,而不是一个末日装置设备.不管你是否有一次约会,销售.促销.或者游戏,你可以受益于使用原生JavaScript构建一个时钟,而不是拿到一个现成的 ...
- Python开发入门与实战12-业务逻辑层
12. Biz业务层 前面的章节我们把大量的业务函数都放在了views.py里,按照目前这一的写法,当我们编写的系统复杂较高时,我们的views.py将会越来越复杂,大量的业务函数包含其中使其成为一个 ...
- php5.2转向 PHP 5.3 的 PHP 开发
PHP 5.3 开始,为了更好的向 PHP 的未来版本(PHP6) 过渡,将未来不再支持的函数标记为 DEPRECATED.在代码中使用这些函数,将毫不留情的在页面中显示警告信息:“使用了过时的函数… ...
- JS 代码编一个倒时器
有时候在生活中,你需要一个JavaScript倒计时时钟,而不是一个末日装置设备.不管你是否有一次约会,销售.促销.或者游戏,你可以受益于使用原生JavaScript构建一个时钟,而不是拿到一个现成的 ...
- JS中URL编码参数(UrlEncode)
JS中URL编码参数(UrlEncode) 网上有很多文字作品写涉及在JS中呈现类似UrlEncode功能时都是自定义参数来呈现,其实JS中本身就有那样的参数.参数parameter由于用类似URL的 ...
- 深入剖析最新IE0day漏洞
在2018年4月下旬,我们使用沙箱发现了IE0day漏洞;自从在野外发现上一个样本(CVE-2016-0189)已经有两年多了.从许多方面来看,这个特别的漏洞及其后续的开发比较有趣.下一篇文章将分析最 ...
随机推荐
- SQL Server 2008性能故障排查(二)——CPU
原文:SQL Server 2008性能故障排查(二)--CPU 承接上一篇:SQL Server 2008性能故障排查(一)--概论 说明一下,CSDN的博客编辑非常不人性化,我在word里面都排好 ...
- 进口fbx角色动画read-only解
原文链接:http://answers.unity3d.com/questions/8172/how-to-add-new-curves-or-animation-events-to-an-im.ht ...
- Android Studio简单设置(转)
Android Studio 简单设置 界面设置 默认的 Android Studio 为灰色界面,可以选择使用炫酷的黑色界面.Settings --> Appearance --> Th ...
- linux 字符界面浏览器 w3m(转)
最近找到了几个linux终端下使用的浏览器,主要用来测试本机web服务器是否搭建成功.因为我们一般是用ssh客户端连接linux的,所以很需要一个字符界面的浏览器.找了几个显示都不理想,只有w3m用起 ...
- VB.NET之错误异常处理
相对于VB而言,VB.NET中引入了很多特色.当中最吸引我的就是引入了结构化异常处理. 尽管VB.NET仍然支持OnError Goto类型的异常处理,可是这样做并非非常好.相比而言,结构化异常处理更 ...
- SQLite外键
数据库工具:SQLite Manager(V0.7.7) SQLite版本号:V3.6.19+ SQLite Manager 默认是不开启外键的. 那么怎样,使用它创建一个带有外键的表呢? 一.开启外 ...
- jquery的智能提示控件
福利到~分享一个基于jquery的智能提示控件intellSeach.js 一.需求 我们经常会遇到[站内搜索]的需求,为了提高用户体验,我们希望能做到像百度那样的即时智能提示.例如:某公司人事管 ...
- 我异常-VS2012“System.AccessViolationException: 试图读取或写入保护内存。”
我的系统是win7 64位 系统 安装的是 Visual studio 2012.从SVN上下载了源代码.一个B/S的系统.能正常载入登陆页,但在输入登录信息要登录的时候,就报错了: - ...
- java volatile的一个验证反例(转)
网上关于java volatile的资料已经不少了,但搜了好久也没看到谁用代码很好地验证过使不使用volatile的差异.最近自己写了个测试,意外的看到了两者的明显区别,为什么说意外呢,因为根据我的测 ...
- (大数据工程师学习路径)第四步 SQL基础课程----创建数据库并插入数据
一.练习内容 1.新建数据库 首先,我们创建一个数据库,给它一个名字,比如“mysql_shiyan”,以后的几次实验也是对mysql_shiyan这个数据库进行操作. 语句格式为“CREATE DA ...