473,387 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Requesting advice on methods to use

Hi,
I am writing an application in VB .NET 2005. Is it a good idea to use
VB 6-like functions such as Trim, MsgBox, Val, etc. or should I think
of using members of the System.String class, MessageBox class, etc.?
What are the pros and cons?

Thanks

Jan 12 '06 #1
3 869
<ya****@gmail.com> wrote:
I am writing an application in VB .NET 2005. Is it a good idea to use
VB 6-like functions such as Trim, MsgBox, Val, etc. or should I think
of using members of the System.String class, MessageBox class, etc.?
What are the pros and cons?


I'd use the non-Microsoft.VisualBasic methods unless there's something
you want which isn't easily provided by the "normal" framework. That
way it's easier for other .NET developers who may not know VB6 to
understand your code, and it'll probably be more object-oriented too.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Jan 12 '06 #2
dgk
On 12 Jan 2006 05:14:49 -0800, ya****@gmail.com wrote:
Hi,
I am writing an application in VB .NET 2005. Is it a good idea to use
VB 6-like functions such as Trim, MsgBox, Val, etc. or should I think
of using members of the System.String class, MessageBox class, etc.?
What are the pros and cons?

Thanks


I like using the Net versions because it makes my skills more
transportable if I get a job in another language, which won't ever
happen because I'm a VB kind of guy.

But, when .Net first came out, I examined the IL produced by a VB
function (maybe Left?) compared to the IL produced by the equivalent
..Net method and the code was not the same. Now, perhaps JIT compiles
the IL into the same runtime code, but I don't know.
Jan 12 '06 #3
<ya****@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hi,
I am writing an application in VB .NET 2005. Is it a good idea to use
VB 6-like functions such as Trim, MsgBox, Val, etc. or should I think
of using members of the System.String class, MessageBox class, etc.?
What are the pros and cons?

Thanks


Personal preference in most cases. I usually use the .Net ones for two
reasons:
1) when I see an example or snippet I want to use, it nearly always uses
..Net calls.
2) if I want to convert a module to C#, it is far easier if it is written
using .Net calls.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
Jan 14 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Nick Malik | last post by:
reposting to a wider audience "Nick Malik" <nickmalik@hotmail.nospam.com> wrote in message news:WYONc.203854$XM6.119642@attbi_s53... > My turn to ask a question > > I am working on a plug-in...
5
by: Sens Fan Happy In OH | last post by:
I am currently working on a webpage that requires some rather extraordinary things to be done to it and I am not sure how best to go about doing this so I hope possibly someone can help me out on...
0
by: C. Barnes | last post by:
Szabolcs Nagy wrote: >nice interface, but with 3d apps i prefer cgkit's approach, which has >vec3, vec4, mat3, mat4 and quat types with lots of useful functions for >3d graphics (like...
3
by: Rob Thomas | last post by:
Hi, I'm just getting started with real OO design and programming and am after a little advice. Basically, I've got a Customer class and an Agency class. The Agency class inherits all the...
4
by: Nick Malik | last post by:
My turn to ask a question I am working on a plug-in for Sharepoint that will allow a developer to add workflow rules. One of the rules will inform the adapter that it should load a DLL that the...
12
by: Josema | last post by:
Hi, Im starting develop a portal, and i never used interfaces in the past. As any portal will be possible register (add), delete, modify a user. In this portal also will be possible...
2
by: mgoold2002 | last post by:
Hello. I've just begun programming in VB .NET, and I'm trying to turn all my modules into classes. In order to retrieve/exchange values from one class to another, I initiated New instances of the...
8
by: george.leithead | last post by:
Hi all, I'm looking for some advice on how best to achitect the following requirement. I'm basically writing a Fantasy Football (FF) Web site, and would like to have it fully OO and have it...
232
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.