Migrates from VBScript Functions to C#

Some VBScript functions are not implemented in C#. So when ASP2ASPX converts VBScript functions to C#, maybe Microsoft.VisualBasic.dll is still required. In this case, please reference Microsoft.VisualBasic.dll to your ASP.NET Project.

Please see following table that lists VBScript and C# codes:

VBScript 5.6 Functions C# code
AbsSystem.Math.Abs
Arraynew Object() { }
Asc, AscB, AscW(short)string[0], byte(string[0]), (int)string[0]
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
DateSystem.DateTime.Today
DateAddMicrosoft.VisualBasic.DateAndTime.DateAdd
DateDiffMicrosoft.VisualBasic.DateAndTime.DateDiff
DatePartMicrosoft.VisualBasic.DateAndTime.DatePart
DateSerialnew DateTime()
DateValueMicrosoft.VisualBasic.DateAndTime.DateValue
DaySystem.DateTime.Day
Eval *
ExpSystem.Math.Exp
FilterMicrosoft.VisualBasic.Strings.Filter
Fix(int)
FormatCurrencyMicrosoft.VisualBasic.Strings.FormatCurrency
FormatDateTimeMicrosoft.VisualBasic.Strings.FormatDateTime
FormatNumberMicrosoft.VisualBasic.Strings.FormatNumber
GetLocaleSession.LCID
GetObjectMicrosoft.VisualBasic.Interaction.GetObject
GetRef(Does not support)
HexInt32.ToString("X")
HourSystem.DateTime.Hour
InputBoxMicrosoft.VisualBasic.Interaction.InputBox
InStr, InstrBSystem.String.IndexOf
InStrRevSystem.String.LastIndexOf
IntMicrosoft.VisualBasic.Conversion.Int
IsArrayMicrosoft.VisualBasic.Information.IsArray
IsDateMicrosoft.VisualBasic.Information.IsDate
IsEmptyMicrosoft.VisualBasic.Information.IsEmpty
IsNullSystem.Convert.IsDBNull
IsNumericMicrosoft.VisualBasic.Information.IsNumeric
IsObject*
JoinSystem.String.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
MinuteSystem.DateTime.Minute
MonthSystem.DateTime.Month
MonthNameMicrosoft.VisualBasic.DateAndTime.MonthName
MsgBoxMicrosoft.VisualBasic.Interaction.MsgBox
NowSystem.DateTime.Now
OctSystem.Convert.ToString(Number, 8)
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*
SecondSystem.DateTime.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
TimeSystem.DateTime.Now.TimeOfDay
TimerSystem.DateTime.Now.TimeOfDay.TotalSeconds
TimeSerial(hour, minute, second)new TimeSpan(hour, minute, second)
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
YearSystem.DateTime.Year

* Don't support the function