Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I've just run across this article which talks about the Microsoft.VisualBasic namespace and its Compatibility namespace. According to this the Microsoft.VisualBasic namespace does contain true .NET functions, only the compatibility library doesn't.

 

Looks like I'll be restoring the Microsoft.VisualBasic namespace to my project templates.

TT

(*_*)

 

There are 10 types of people in this world;

those that understand binary and those that don't.

Posted

Very interesting - It did state that InputBox is not a true .NET feature what is the .NET equivalent to the InputBox?

 

How can I set Visual Basic.net to not allow me to use anything that will require the compatability namespace. I.e If i type into the code editor InputBox(whatever) then if it doesn't place a squiggly line underneath it, and intellisense pops up parameter requirements, i will presume it is ok to use it!

Visit: VBSourceSeek - The VB.NET sourcecode library

 

 

"A mere friend will agree with you, but a real friend will argue."
Posted

That's a good point. There doesn't seem to be a seperate Compatilibily namespace, it is part of the VisualBasic namespace.

 

It looks like that article isn't very accurate. :(

TT

(*_*)

 

There are 10 types of people in this world;

those that understand binary and those that don't.

  • *Gurus*
Posted

There is a separate compatibility namespace, the DLL for which is only referenced if you've used the upgrade wizard however.

 

Using types in Microsoft.VisualBasic is not necessarily bad practice, but the types in there are not true .NET classes, in most senses of the word. They are only there as helpers for Visual Basic. There's nothing wrong with using them.

 

On the other hand, a common viewpoint (including mine) is that it's bad practice to use them, because when you inevitably have to write something in C#, or even read something, or convert something - you're going to be disadvantaged for having relied on those helpers in the past.

 

They can be very helpful for people struggling to make the transition from VB6 to .NET, but in my opinion the time comes when you don't need them to hold your hand any more, and you can use the pure framework like other .NET languages do.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...