首页 > 代码库 > 把VBScript的函数迁移到C#.NET

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

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


VBScript 5.6 FunctionsC# code
AbsSystem.Math.Abs
ArrayNew Object() { }
Asc, AscB, AscWMicrosoft.VisualBasic.Strings.Asc
AtnSystem.Math.Atan
CBoolSystem.Convert.ToBoolean
CByteSystem.Convert.ToByte
CCurSystem.Convert.ToDecimal
CDateSystem.Convert.ToDateTime *
CDblSystem.Convert.ToDouble
Chr(char)
CIntSystem.Convert.ToInt32
CLngSystem.Convert.ToInt64
CosSystem.Math.Cos
CreateObjectCreateObject or New Instance in .NET
CStrSystem.Convert.ToString
DateDateTime.Today
DateAddMicrosoft.VisualBasic.DateAndTime.DateAdd
DateDiffMicrosoft.VisualBasic.DateAndTime.DateDiff
DatePartMicrosoft.VisualBasic.DateAndTime.DatePart
DateSerialMicrosoft.VisualBasic.DateAndTime.DateSerial
DateValueMicrosoft.VisualBasic.DateAndTime.DateValue
DayMicrosoft.VisualBasic.DateAndTime.Day
Eval(Does not support)
ExpSystem.Math.Exp
FilterMicrosoft.VisualBasic.Strings.Filter
FixMicrosoft.VisualBasic.Conversion.Fix
FormatCurrencyMicrosoft.VisualBasic.Strings.FormatCurrency
FormatDateTimeMicrosoft.VisualBasic.Strings.FormatDateTime
FormatNumberMicrosoft.VisualBasic.Strings.FormatNumber
GetLocaleSession.LCID
GetObjectMicrosoft.VisualBasic.Interaction.GetObject
GetRef(Does not support)
HexMicrosoft.VisualBasic.Conversion.Hex
HourMicrosoft.VisualBasic.DateAndTime.Hour
InputBoxMicrosoft.VisualBasic.Interaction.InputBox
InStr, InstrBMicrosoft.VisualBasic.Strings.InStr
InStrRevMicrosoft.VisualBasic.Strings.InStrRev
IntMicrosoft.VisualBasic.Conversion.Int
IsArrayMicrosoft.VisualBasic.Information.IsArray
IsDateMicrosoft.VisualBasic.Information.IsDate
IsEmptyMicrosoft.VisualBasic.Information.IsEmpty
IsNullSystem.Convert.IsDBNull
IsNumericMicrosoft.VisualBasic.Information.IsNumeric
IsObject*
JoinMicrosoft.VisualBasic.Strings.Join
LBoundMicrosoft.VisualBasic.Information.LBound
LCaseSystem.String.ToLower
Left, LeftBSystem.String.Substring(0,..)
Len, LenBSystem.String.Length
LoadPicture*
LogSystem.Math.Log
LTrimSystem.String.TrimStart
Mid, MidBSystem.String.Substring
MinuteMicrosoft.VisualBasic.DateAndTime.Minute
MonthMicrosoft.VisualBasic.DateAndTime.Month
MonthNameMicrosoft.VisualBasic.DateAndTime.MonthName
MsgBoxMicrosoft.VisualBasic.Interaction.MsgBox
NowSystem.DateTime.Now
OctMicrosoft.VisualBasic.Conversion.Oct
ReplaceMicrosoft.VisualBasic.Strings.Replace
RGBMicrosoft.VisualBasic.Information.RGB
Right, RightBSystem.String.Substring
RndMicrosoft.VisualBasic.VBMath.Rnd
RoundSystem.Math.Round
RTrimSystem.String.TrimEnd
ScriptEngine*
ScriptEngineBuildVersion*
ScriptEngineMajorVersion*
ScriptEngineMinorVersion*
SecondMicrosoft.VisualBasic.DateAndTime.Second
SetLocale*
SgnSystem.Math.Sign
SinSystem.Math.Sin
Spacenew String(‘ ‘,...)
SplitMicrosoft.VisualBasic.Strings.Split
SqrSystem.Math.Sqrt
StrCompSystem.String.Compare
StringNew String()
StrReverseMicrosoft.VisualBasic.Strings.StrReverse
TanSystem.Math.Tan
TimeMicrosoft.VisualBasic.DateAndTime.TimeOfDay
TimerMicrosoft.VisualBasic.DateAndTime.Timer
TimeSerialMicrosoft.VisualBasic.DateAndTime.TimeSerial
TimeValueMicrosoft.VisualBasic.DateAndTime.TimeValue
TrimSystem.String.Trim
TypeNameMicrosoft.VisualBasic.Information.TypeName
UBoundMicrosoft.VisualBasic.Information.UBound
UCaseSystem.String.ToUpper
VarTypeMicrosoft.VisualBasic.Information.VarType
WeekdayMicrosoft.VisualBasic.DateAndTime.Weekday
WeekdayNameMicrosoft.VisualBasic.DateAndTime.WeekdayName
YearMicrosoft.VisualBasic.DateAndTime.Year