Migrate the functions of VBScript to C#.net

Source: Internet
Author: User
Tags abs filter cos functions join sin split trim
vbscript| function

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
MySpace 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.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.