|
-
Apr 3rd, 2006, 12:22 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] vb6 code in .NET ??
I read somewhere about VB6 code in .NET so is it bad to use Left() mid() etc in .NET or should I use the new equivalents which I cant remember?
if I dont use any vb6 code, will it still import the vb6 code libraries when I compile it? As wont this affect the filesize, performance etc?
-
Apr 3rd, 2006, 12:30 PM
#2
Re: vb6 code in .NET ??
I asked the same question not too long ago. There is nothing "wrong" with using those functions because they all map to equivalents within the .NET framework.
Importing never changes the size of your file, it simply gives you access to the functions without typing out the fully qualified name. IE - I can always use System.IO.StreamReader, but if I import System.IO, then I only need to type StreamReader. This doesn't change the size of my program at all, and it will be included in the .NET namespace (which the user must have on their computer) no matter what.
I had a problem finding a list of .net equivalents so I made my own. Look in my signature for a list.
-
Apr 3rd, 2006, 12:37 PM
#3
Thread Starter
Frenzied Member
Re: vb6 code in .NET ??
thanks eye, so there really is no right or wrong in using...
VB Code:
something = data.Substring(3)
'or
something = Mid(data, 3)
already got your functions page bookmarked! saw it on one of the sticky threads
quick other question... would a identical app in vb6 be bigger or small in .net? meaning, if i converted an app from vb6 to .net which would be bigger? (generally speaking, I know if 3rd party controls were used it would be bigger)
-
Apr 3rd, 2006, 01:34 PM
#4
Re: vb6 code in .NET ??
There is nothing technically wrong with it, but I (personally) don't like to use anything from the Microsoft.VisualBasic namespace. If there is a way to do it in .NET then I use that instead because it is more object-oriented. Also, if I need to read/learn C# or other .NET languages then being familiar with the "new way" of doing things is even more helpful.
I can't say for sure about size of the program, but I am inclined to assume that it would be smaller because of the reliance on the .NET framework. But then again, VB 6 simply relied on it's runtime files, so I am not really sure.
-
Apr 3rd, 2006, 02:02 PM
#5
Thread Starter
Frenzied Member
Re: vb6 code in .NET ??
k thanks
-
Apr 3rd, 2006, 02:11 PM
#6
Re: vb6 code in .NET ??
No problem. 
Don't forget to mark your thread resolved (menu at the top: "Thread Tools > Mark Thread Resolved").
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|