把VBScript的函數遷移到C#.NET

來源:互聯網
上載者:User
vbscript|函數

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

* Don't support these functions.



相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.