Sei sulla pagina 1di 4

Visual Basic .NET/Visual Basic 6 to .

NET Funciones Equivalentes


Visual Basic 6 App.Path CallByName Circle Collection Command DoEvents Environ Err Error GetSetting IIf InputBox Len MsgBox RGB SavePicture SaveSetting SendKeys Shell Switch TypeName Unload VarType [edit]Strings Visual Basic 6 .NET Equivalent Application.StartupPath Type Object.InvokeMember Graphics Object.DrawEllipse Collections.Hashtable, Collections.Dictionary Environment.GetCommandLineArgs Application.DoEvents Environment.GetEnvironmentVariable Deprecated - Use Exception object and Try ... Catch ... End Try statement Exception Object.Message Deprecated - Look into Configuration.ConfigurationSettings Deprecated Deprecated - Make your own form Runtime.InteropServices.Marshal.SizeOf MessageBox.Show Color Object.FromArgb Image Object.Save Deprecated - Look into Configuration.ConfigurationSettings SendKeys.Send Process.Start Deprecated Any Object.GetType.ToString Deprecated Any Object.GetType .NET Equivalent

Asc Chr Format FormatCurrency FormatDateTime FormatNumber FormatPercent Hex InStr InStrRev Join LCase Left Len LTrim Mid Oct Replace Right RTrim Space Split String StrReverse Trim UCase [edit]Files

Convert.ToInt32(Char) Convert.ToChar Any Object.ToString(Format String) Any Numeric Object.ToString("c") Date Object.ToString(Format String), Date Object.ToLongDateString Any Numeric Object.ToString(Format String) Any Numeric Object.ToString("p") Integer Object.ToString("x"), Convert.ToString(Integer, 16) String Object.IndexOf String Object.LastIndexOf String.Join String Object.ToLower String Object.Substring String Object.Length String Object.TrimStart String Object.Substring Convert.ToString(Integer, 8) String Object.Replace String Object.Substring String Object.TrimEnd String Object.PadLeft, String Object.PadRight String Object.Split String Object = New String(Char, Count) Dim c() As Char = Array.Reverse(String Object.ToCharArray) String Object.Trim String Object.ToUpper

& Directories
.NET Equivalent IO.Directory.SetCurrentDirectory

Visual Basic 6 ChDir

CurDir Dir EOF FileAttr FileCopy

IO.Directory.GetCurrentDirectory IO.Directory.GetFiles, IO.Directory.GetDirectories, IO.Directory.Exists, IO.File.Exists IO.StreamReader.Peek = -1 Deprecated - Use StreamReader or StreamWriter IO.File.Copy

FileDateTime IO.File.GetLastAccessTime, IO.File.GetCreationTime FileLen GetAttr Loc LOF MkDir RmDir SetAttr [edit]Arrays Visual Basic 6 Filter UBound [edit]Date Array.BinarySearch Any Type of Array.GetUpperBound(0) .NET Equivalent IO.FileStream Object.Length IO.File.GetAttributes IO.Stream Object.Position IO.Stream Object.Length IO.Directory.CreateDirectory IO.Directory.Delete IO.File.SetAttributes

& Time
.NET Equivalent Date Object.Add Date Object.Subtract DateTime.Now

Visual Basic 6 DateAdd DateDiff Now [edit]Math Visual Basic 6 Abs Atn Cos Exp Fix Math.Abs Math.Atan Math.Cos Math.Exp

.NET Equivalent

Math.Floor (for negative numbers), Math.Ceiling (for positive numbers)

Int Log Randomize Rnd Round Sgn Sin Sqr Tan

Math.Floor Math.Log Deprecated - Random Object is automatically randomized declared System.Random Object.Next Math.Round Math.Sign Math.Sin Math.Sqrt Math.Tan

Potrebbero piacerti anche