把VBScript的函数迁移到C#.NET

原文:把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,古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。