Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,062 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,747 people online right now. Registration is fast and FREE... Join Now!




Using 'Legacy' VB libraries in VB.net

 
Reply to this topicStart new topic

Using 'Legacy' VB libraries in VB.net

Using VB specific libraries in VB.net?
Is it OK?
Yes [ 1 ] ** [25.00%]
No [ 3 ] ** [75.00%]
Total Votes: 4
Guests cannot vote 
Nayana
26 Feb, 2008 - 12:56 AM
Post #1

DIC Hawk - 나야나 नयन:
Group Icon

Joined: 14 Nov, 2007
Posts: 824



Thanked: 5 times
Dream Kudos: 175
My Contributions
I was just wondering on what people thought about using the VB specific libraries within VB.net

My personal choice is that it's OK. After all, they are just functions at the end of the day. In fact why not add them to C#?

For instance, in VB, one can get the 2 right hand characters like this:
text = Right(text, 2)

Whereas if we used the standard libraries:
text = text.Substring(text.Length - 2)

text = Left(text, 2) becomes
text = text.Substring(0, 2)

Mid(text, 5, 1) = "a" becomes
text = text.Remove(4, 1).Insert(4, "a") or
text = text.Substring(0, 4) + "a" + text.Substring(5)
---

I may have just changed my mind. I threw up when I remembered the 1 based strings in legacy VB code!!

Anyway... what are your thoughts on the matter?
User is offlineProfile CardPM
+Quote Post

RodgerB
RE: Using 'Legacy' VB Libraries In VB.net
26 Feb, 2008 - 01:26 AM
Post #2

D.I.C Lover
Group Icon

Joined: 21 Sep, 2007
Posts: 2,166



Thanked: 17 times
Dream Kudos: 2200
Expert In: Dot Net Technologies

My Contributions
My thoughts are that you should always try to conform to the latest coding practices and standards. It's also better to use .NET as much as possible when using VB.NET, as it makes porting to other languages easier.

Anything you can do in Legacy you should be able to do in .NET anyway. If you don't like how a function looks, create a wrapper for it instead. So quite simply, I hate the Legacy libraries and wish VB.NET didn't have them, as it provokes confusion as to what is and isn't a .NET function.

Thats just my 2c.
User is online!Profile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 10:37PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month