把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)已经有两年多了.从许多方面来看,这个特别的漏洞及其后续的开发比较有趣.下一篇文章将分析最 ...
随机推荐
- LINQ之路(2):LINQ to SQL本质
LINQ之路(2):LINQ to SQL本质 在前面一篇文章中回顾了LINQ基本语法规则,在本文将介绍LINQ to SQL的本质.LINQ to SQL是microsoft针对SQL Server ...
- NET MVC过滤器
NET MVC过滤器 本系列目录:ASP.NET MVC4入门到精通系列目录汇总 在ASP.NET MVC中有四种过滤器类型
- Visual Studio Team Services使用教程--添加团队成员
- JavaScript之三:jQuery插件开发(一)
在早期的开发中,正如前面闭包中所提到的那样,人们一开始并没有意识到要开发出插件这么个玩意儿,都是遇到啥写啥.在长期的工作中,人们发现很多代码是重复的,写了一遍又一遍,以登录页面为例,每写一次都需要重新 ...
- SQL Server安全性专题一:简介
原文:SQL Server安全性专题一:简介 一. 安全威胁与法则 1. 安全定义 2. 安全威胁 3. 安全法则 安全定义: 在SQLServer环境中,安全性可以认为是[数据保护].包括: 数 ...
- SQL Server系统数据库备份最佳实践
原文:SQL Server系统数据库备份最佳实践 首先了解主要的系统数据库: 系统数据库 master 包含登录信息和其他数据库的核心信息 msdb 存储作业.操作员.警报.备份还原历史.数据库邮件信 ...
- RH253读书笔记(7)-Lab 7 Electronic Mail
Lab 7 Electronic Mail Goal: To build common skills with MTA configuration Estimated Duration: 90 min ...
- Android深入研究Adapter重绘
一直以来Adapter的使用都仅仅是流于表面,仅仅知道要实现几个抽象的方法,把Adapter设置给某种listView,就能够非常好的工作起来.所谓理解仅仅是建立在主观的猜想上面,认为应该是这样,对, ...
- hdu 4035 Maze(期待更多经典的树DP)
Maze Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others) Total Submi ...
- SQL Server 2005 MD5函数
原文:SQL Server 2005 MD5函数 在SQL Server 2005下自带的函数HashBytes() ,此函数是微软在SQL Server 2005中提供的,可以用来计算一个字符串的M ...