Talk:Visual Basic (.NET)/Archive 1
This is an archive of past discussions about Visual Basic (.NET). Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 |
The My class a pseudo-class?
I believe the My class is a pseudo-class that the VB.NET compiler converts to direct references to .NET Framework features, not a "class library" that would have to be distributed with your application. But I haven't played with a preview to confirm this... Mark Hurd 15:06, 25 Jun 2004 (UTC)
- You don't need to ship a separate class library for applications making use of My. All libraries used for My are part of Microsoft's .NET Framework package.--143.50.168.104 15:01, 9 December 2005 (UTC)
- The VB 05 compiler actually does do a bit of work for the My Feature. If you dis assemble a VB 05 generated library using ildasm, you will see quite a lot of code to support the My Feature. It is as if you are including a namespace right there in your app, so I guess we can call it the "My" pseudo-namespace, but I guess that's original research. How about calling it the "My" Feature ?Yuvi 01:39, 3 July 2006 (UTC)
- 'My' is actually not a class but rather a namespace.--84.191.174.114 (talk) 14:37, 16 May 2008 (UTC)
VB vs VB.NET; and "Express Ed."
I realise that referring to VB5/6 as VB is a convenient shorthand, but the language as a whole remains Visual Basic, mostly due to its heritage in BASIC and the retention of a lot of the syntax. The .NET power is mostly in the libraries, and in that sense, all of the .NET languages are more or less equivalent in that they are just different wrappers around the library functions.
Incidentally, I see the introduction of the "Express Edition" as a way to hook up computer owners with a programming language "out of the box" in the same way that every computer used to come with BASIC as standard. In the old days, BASIC was pretty much the entire OS. Nowadays, there's not a lot of base grade exposure to VB, unless you count VBScript and stuff in Office, and that's pretty cruddy. A teenager with his first computer is unlikely to go out and buy VS 2003, or even VB.NET 2003 - it's easier, cheaper and more immediately useful to learn Java.
- I would disagree with the comment about Express Editions. Express editions are free versions of Visual Studio, no more difficult to download and use than Java. And the language is fully supported. What are not supported are Visual Studio extras (web services, source code control, etc.)Willbennett2007 (talk) 03:13, 30 April 2010 (UTC)
Getting "edit and continue" back will be great. Lousy for source code control, but oh so convenient! Pete 22:57, 9 Jun 2005 (UTC)
- I like VB.NET, but I do understand where the people who say it's a totally different language are coming from. They really are different in significant ways - it's a Basic that's "grown up", but it lost something along the way. Microsoft has been trying to bring the two concepts back together, and that is represented by the name change, but I'm not 100% sure they've managed it, yet. I need to spend more time trying out the 2005 version, as I've only just managed to get access to an MSDN subscription for it.
- I think you're right about the Express editions. I'm glad they're bringing something like that back, because it truly was a pain trying to get some sort of a student edition here in the UK. As for source control . . . yeah, there are some VB.NET applications that need it (probably more now that it's a "serious" language), but for line-of-business stuff, you just have one guy in the office who needs it to "work, now, damnit!" :-) GreenReaper 23:36, 9 Jun 2005 (UTC)
- Well the problem with Express is that you have to live with restricted features. Student editions ( i got one of VS 2005 Pro for 130 ) are better if you have access to them. I still have Basic on my PCs ( on an old school PC i could even make a copy of QuickBasic which could compile. But also you have the many free compilers out there , like DevC++ which is nice too(but VS just has more features) ! masterfreek64
Ext lks all over
Is there a way we could avoid the sprinkling of external links everywhere in the article? IMO it's a tad distracting when one tries to concentrate on the text (which we should, serious pursuers of knowledge that we are...). While not arguing the removal of each and every ext lk from the text proper, I do think their number needs to be reduced. --Wernher 05:19, 14 Jun 2005 (UTC)
.NET Framework
If I get time, I'll reword the little bit round this, but take a quick look at:
- In VB6, all programs built can be used directly on any Windows computer, whereas VB.NET programs need a patch called .NET Framework to work on. This had created much inconvenience to both programmers and users.
- I think it is inaccurate to refer to the .Net Framework as a 'patch'. It is the essential Framework used for all Microsoft development, be it VB.Net, C#, PowerShell, etc. And it is a very extensive set of classes for all kinds of programming tasks.Willbennett2007 (talk) 03:19, 30 April 2010 (UTC)
Ignoring the grammatical problem I've just spotted; isn't this somewhat inaccurate, given that Windows 95 and 98 (non SE) require the VB runtime files (v6) to be installed? This article does read somewhat like an argument taking into account both sides here; it's not quite the factual tone I think the 'pedia is after. Rob Church 04:27, 28 July 2005 (UTC)
- It's me who originally added this sentence. Thank's for pointing out that factual error. Deryck C. 05:49, 28 July 2005 (UTC)
- There are also issues of what components come installed - typically VB6 apps have to have some OCX's to do anything special. It is however true that the .NET Framework install requirements causes app installs to be much larger than they could be. I've rewritten that paragraph to represent its information in a more compact form and to add a note about the .NET in Windows Vista. GreenReaper 16:48, 28 July 2005 (UTC)
C#
On the other hand, C# 2005 will have additional features that will not natively be in Visual Basic 2005:
- Refactoring, the ability to automatically re-organize code. Visual Basic 2005 will require a separate VS add-on extension to take advantage of a limited number of code refactorings.
- Anonymous methods, similar to closures.
- Iterators, simpler IEnumerable implementations.
C# 2005 will also gain static classes, though these are functionally and implementationally the same as VB Modules which have been in place since VB7 (2002). The only notable difference is that VB modules are imported implicitly and their members are visible from the containing namespace level without qualification.
Why is so much C# stuff here? Isn't it better off in C# article. --soUmyaSch 14:34, 5 June 2006 (UTC)
- If you notice the first line in the parent post, these items are listed as direct comparison between C# and VB, as these are features excluded from VB. Your font/color thing is annoying, and makes the talk page hard read. Don't do that. Gaijin42 14:52, 5 June 2006 (UTC)
- I've removed it. We don't need a list of "missing" features. Also, to Gaijin42, it's not helpful to criticise other editors for their choice of signature colour; let's stay focused on improving the encyclopedia. Warrens 15:20, 5 June 2006 (UTC)
- I think the missing features might be usefull, as it is a very common question for people to ask if they should use C# or VB.Net. Perhaps a seperate comparison article might be more appropriate tho. As for my criticism, I think it is very relevant. soumyasch's comment took up 1/2 a line in the edit screen. His signature took up 4 lines. It is a waste of database space (which I know is cheap, but still... its not his money), and it makes the edit screen harder to read and use. Gaijin42 15:33, 5 June 2006 (UTC)
- This is Wikipedia; we're not here to sell people on one language or another. An article about Visual Basic .NET should be about what Visual Basic .NET in and of itself is... there is plenty to discuss without going into comparative analysis with other languages or development environments. Yes, developers may be interested in knowing the difference between this language and C#, but if we start going down that route, then it opens the doors to all sorts of other comparasins, like VB.NET vs. Java, Delphi or other BASIC variants (e.g. REALbasic), or open-source alternatives and implementations, or whatever else that may be out there. Warrens 16:12, 5 June 2006 (UTC)
- See my comment below Gaijin42 18:24, 5 June 2006 (UTC)
- Why state the missing features and thus deliberately point to the deficiency of the language? If anything, let those who would like to use the language figure it out which they like. And if you are really intent on comparing, why compare it with just C#. There are hundreds of other languages.
- Firstly, I didn't make the original post pointing out the missing features, so talk to that user about why it wasn't more even handed. Secondly, C# vs VB.Net is a much more topical comparison than vb.net vs anything, or c# vs anything. Many companies are standardized on .net, and leave it to the developers to choose the language. For all the groups out there, that have already decided on .net, which language to use is the next question. Also,warrens, you didn't read my comment close enough, I said a seperate comparison article would be appropriate - you are quite right that the main article isn't the place for it. Gaijin42 18:24, 5 June 2006 (UTC)
- I was merely stating your point in saying that deficiencies of any language vis-a-vis another should not be highlighted, the article of any language is not a place for that. There are many languages to compare to - a Comparison of languages, or more specifically Comparison of .net languages, maybe. --soum সyasch 18:43, 5 June 2006 (UTC)
- Regarding signatures, its better you refrain from comments like it is a waste of database space (which I know is cheap, but still... its not his money). Not everybody will take it casually. How do you know if I have donated money to Wikipedia or not, and paid for the share of db space that I am using. I have changed my sig, but if it still annoys you, I can't help it. It doesn't annoy me. And it is just to see, never should anybody have to sift trough my sig code to fix anything. So I don't see anybody having any problem with how it looks in edit view. --soum সyasch 18:14, 5 June 2006 (UTC)
- I am sorry if I came off overly harsh. My point in the difficulty reading was that your original sig was very convoluted, and very different than the standard sig. Anyone reading your edits in a talk page, needs to parse through that to decide what is your sig, vs what might be links to other resources etc. Your new sig is much less verbose, and a significant improvement. I still don't see the problem with the standard sig tho. Thank you for taking my suggestion to heart, and I again am sorry if I was too harsh. —Preceding unsigned comment added by Gaijin42 (talk • contribs)
- My apologies, too. I also wrote harsh words. And maybe you would like to be bit more careful with your signature. :-) --soum সyasch 18:43, 5 June 2006 (UTC)
I created Comparison_of_C_sharp_to_vb_dot_net to address the topic above. I will refrain from linking it into the main article, until you guys have a chance to go through and vet it. I am a C# developer, and haven't used VB.Net since 1.0, so I will let you guys correct me. There may be some controversy around the culture. I think its mportant, and real, but it may need massaging.Gaijin42 20:01, 5 June 2006 (UTC)
Perhaps so much discussion of C# might be inappropriate, but would it not be a good idea to have the VB.Net article list limitations of VB.Net? Things it cannot do that other languages can? For example it does not support the yield keyword that C# does, nor the multiple inheritence that C++ does. Would this not be necessary to give a complete description of VB.Net?Willbennett2007 (talk) 13:28, 22 April 2010 (UTC)
More tutorial sites/community support forums
While this may not need to be added to the main page, I was curious what tutorial sites/community support forums are considered to be "the best" these days for VB.NET help?
- CodeProject and the official documentation for VB.NET. DJLarZ 16:11, 11 January 2007 (UTC)
- VBForums 6/12/2009 - FA —Preceding unsigned comment added by 208.38.35.13 (talk) 15:06, 12 June 2009 (UTC)
- I think it would be a good addition to the main page76.183.110.116 (talk) 12:57, 16 August 2010 (UTC)
The link "petition"
Making the word "petition" a link creates the false impression that it is an internal Wiki link to here: Petition. See my edit on the 26 June 2006 UTC. Splendour 15:48, 27 June 2006 (UTC)
VB.NET-specific libraries ?
The intro refers to "VB.NET-specific libraries". Since all class libraries in .NET are cross-language, I can't see imagine what this means. I think it's an error and I'll remove it soon unless someone speaks up.
Leotohill 20:08, 30 June 2006 (UTC)
I completed the removal from the intro. There is also a similar statement in the section "Cross-platform and open-source development". Again, I'm inclined to remove it, and since that leaves very little in the section, I'll probably just remove the whole section. Speak up now if you object. Leotohill 14:38, 5 July 2006 (UTC)
Who wrote that VB.NET doesn support += and -= ???
Who wrote that VB.NET doesn support += and -= ???
I use this operators in VB.NET 2003 and earlier in VB.NET 2002 all the time. They are NOT new in VB 2005 —Preceding unsigned comment added by 82.111.136.250 (talk • contribs)
- I wrote that passage. I tried with those operators in VB 2003 but they didn't work. You can provide screenshots to support your claim that they worked in 2002. --Deryck C. 12:55, 13 July 2006 (UTC)
- I agree that passage is b******t. They work perfectly well. RTFM
- ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/vblr7/html/vaoprAddAssign.htm
- 195.157.136.194 07:41, 31 August 2006 (UTC)
- They dont appear to work in VB.NET 2008 Lovefist233 (talk) 09:07, 18 March 2008 (UTC)
- They work in VB 2008 for sure. --62.47.136.169 (talk) 13:44, 18 June 2008 (UTC)
c# OR vb.NET HAS MORE programmers, worth more?
Any additional data, or volunteer to integrate this tidbit? --matador300 16:35, 31 July 2006 (UTC)
http://builder.com.com/5100-6390_14-1050356-2.html It might be worth more When it comes to creating applications for .NET, the choice between VB.NET and C# is typically not important. However, it is quite possible that companies are willing to pay more for C# developers; C++ developers have typically been harder to find than VB developers and have been better compensated. It's likely there will be more VB.NET developers than C# developers, so this trend may well continue into the future.
Decompilation
"It is simpler to decompile languages that target Microsoft Intermediate Language, including VB.NET, compared to languages that compile to machine code." This isn't true. Machine code must be readable by nature, and many decompilers are avaibale to covert this into a variety of lanuguages. Higher level lanugages are coded by nature and as such are difficult to decompile without much knowledge of the run time procedure. For instance- there is no decompiler for VB6 available.
- No, it is true. Machine code is readable by machines. It is relatively easy to disassemble, but to decompile it into a human-readable format is a far, far trickier task. MSIL is a virtually complete description of the original input, including complete metadata descriptions of the objects and structures used. Earlier versions of VB were relatively easy to decompile . . . right up to the point where they started to compile to machine-code rather than p-code.
- I agree that there is a difference between decompiling and disassebling. Every program ends up as machine code (I think), whether it is compiled that way at development or runtime. Therefore, you can't really tell what language the machine code came from.
- Indeed, the MSIL metadata is so complete that it is possible to decompile it in (as far as I know) all situations and get perfectly readable code - though it may look a little odd where certain language-specific structures have been used. See .NET Reflector for the tool for this kind of thing. The run time is also coded in MSIL (or, in a few cases in the runtime, native code decorated with appropriate function metadata), and so it makes it very easy to see what library code is being run, and how it works too - it's just like they're part of the program.
- The tools required to decompile MSIL as compared to C++ are far less sophisticated technically, and yet they reliably provide more readable output, because they simply don't have to do as much work. GreenReaper 04:57, 15 August 2006 (UTC)
- MSIL is easily decompiled to source, even so far as you can write an app in VB.Net, compile it, and then decompile to C#. This is true in every "real" case, although some structures like switch statements end up getting writen back as different structures like loops and nested ifs (however the functionality is the same). It is possible to poison MSIL by adding instructions manually to the MSIL that confuse the decompilers, and that is a function employed by some obfuscators. Gaijin42 21:13, 15 August 2006 (UTC)
Seems quite negative
This article seems quite negative. Dot Net is little short of a revolution, and there's only a little that C# can do which VB can't. Given all that surely some nice things have been said it which can be reported in the article?! --kingboyk 05:55, 27 August 2006 (UTC)
Dodgy Grammar etc
Im not a wikipedian, but I am a journalist. Theres alot of really dodgy grammar and unencyclopedic language here. Dot points *dont* start with "actually," , etc.— Preceding unsigned comment added by 58.7.0.146 (talk) 15:10, 1 September 2006 (UTC)
- I'm, There's, a lot
Type-safe or unsafe, which is it?
According to the info box for this article, VB is type-unsafe. If one follows the link from "unsafe" in the info box to here, the example provided seems to indicate that VB is type-safe. I'm not a computer scientist, and I only have minimal self-taught fluency in a few programming languages, so there might be a technicality or some semantics at work of which I am unaware, but on its face these two articles seem inconsistent. Could someone with more expertise please check on this? Thanks, Sdr 13:37, 4 October 2006 (UTC)
- It is possible to use Visual Basic in a type-safe or a type-unsafe manner. You can do everything with Objects if you want. VB.NET will automatically convert things to and from the right types. However, you risk the chance that you will try to do something with an object which contains something that is not convertible to the necessary type. Doing so will result in a run-time error. If you specified the type ahead of time, it would have been a compile-time error.
- In practice I think it has become more type-safe than not, but the features are still there, in part because a lot of VB programmers are used to using them. GreenReaper 14:29, 4 October 2006 (UTC)
- See, this is exactly what I meant when I wrote that there is probably a technical or semantic issue that would prevent me from easily understanding this. Thanks, though, that helps. Sdr 09:13, 5 October 2006 (UTC)
Visual Basic.NET is formerly known as Visual Basic
Take a look at this: Visual Basic Language Specification 8.0 (the very source of this language)
Visual Basic.NET is just a commercial name for Visual Basic in its 8th version.
kn - 201.139.151.55 14:14, 16 November 2006 (UTC)
Actually, Visual Basic.NET only refers to Visual Basic 2002 (7.0) and Visual Basic 2003 (7.1). Visual Basic 2005 has dropped .NET from the name entirely. The only remaining .NET in Visual Basic is in the .NET Framework GuideX2 04:41, 4 December 2007 (UTC)
Former Versions
I think we should add information about former version of VB, especially VB 1 - VB 6 which were available under DOS
84.161.65.183 16:51, 7 December 2006 (UTC)Julian Bangert
Factual error
Visual Basic 6 doesn't have a Opacity property for Forms, as demonstrated in the example.
Also, as stated on this discussion page, "VB1-6 was available for DOS"; That is not all true. Only a few (or only just v1 iirc) was available for DOS. I used Visual Basic 2 on Windows 3.0 (those were the days ^^). The earlier versions are all well covered by the Visual Basic article. 85.225.60.207 23:23, 20 December 2006 (UTC)
Yes, only version 1 was available for DOS as "Microsoft Visual Basic for DOS". This was basically Quick Basic + Forms (in text mode). Very, very, nice... They should not have dropped it.
Either is correct
Seems that the sample code with the MsgBox for VB6 was altered because an anon. editor thought there was no point to add brackets. In fact, for one-parameter functions in VB6, it works both with and without brackets. I'm not reverting, since both are correct, but would just like to add a comment. --Deryck C. 08:48, 13 January 2007 (UTC)
Comparative samples
I did a few edits to the Comparative samples section. This section could stand for more useful examples, but what was there had to be changed. Mainly:
1. The compiler doesn't care what prefix you use for component names.
2. Me is not a namespace, it is a language keyword that refers to the current object instance.
It seems that the author of this section meant to talk about the "My" namespace as discussed on this talk page and elsewhere, but instead looked up "Me" and put a bunch of junk in the article saying it was a new and "powerful" feature. "Me" has existed since at least VB 3 (I've had no experience before that). Blueapples 20:43, 14 February 2007 (UTC) By Ankit Dhir
Timer Height?
Speaking of the code examples (samples), why is Me.Height used with a Timer control? Timers have no Height property; they're not visible. SomeAvailableName (talk) 06:52, 27 December 2012 (UTC)
Eggs-tremely off topic picture
Near the related links section there's placed a picture of eggs labeled XXXXX. What is its purpose? --Lazer erazer 13:44, 22 August 2007 (UTC)
Page is named incorrectly
Microsoft has dropped .NET from Visual Studio product entirely (only the framework is titled .NET now). So shouldn't we rename Visual Basic.NET to just Visual Basic? And change the name of the Visual Basic page to Visual Basic 6? These are the correct names. Or perhaps Visual Basic 2005, Visual Basic 6 etc.
Yes, I agree. Visual Basic 6.0 is exactly that, and Visual Basic.NET refers to Visual Basic 2002 and 2003. Visual Basic 2005 is the latest release of Visual Basic, and the page should reflect that accordingly. GuideX2 04:39, 4 December 2007 (UTC)
SharpDevelop BS in the Intro
The mention of SharpDevelop in the intro paragaraph is in *so* the wrong place that I am tempted to delete it without discussion. Somebody please either move it to a well-written sub-paragraph that relates to the article content or delete it. —Preceding unsigned comment added by Jarhed (talk • contribs) 16:53, 25 February 2008 (UTC)
This article should be completely revamped
I do not think that this article conforms to what a proper article titled "VB.NET" should be. Rather, it seems to be an article written by a VB programmer who focuses too much on the differences between older versions of VB and VB.NET. The proper title of this article as it currently exists would be "Controversy over VB.NET and earlier versions.
If somebody was to read this page without being familiar with VB or VB.NET, they would come away with more information about the differences and related controversy between the tow than about VB.NET itself.
I think that this article should highlight the features of VB.NET, leaving the controversy as a side note. I do understand that it is a very important issue, however, and as such should be contained within a separate article.
BishopOcelot (talk) 15:41, 24 April 2008 (UTC) 4/24/2008 BishopOcelot (talk) 15:41, 24 April 2008 (UTC) BishopOcelot
Msgbox Example
In the msgbox example, it says: Msgbox.Show("Hello, world.")
Msgbox("Hello, World") Works just as well in VB.NET 2005.
24.21.142.206 (talk) 03:26, 2 May 2008 (UTC)
- Indeed. Msgbox is a function and also a class, if I'm not mistaken. Show is a member of the Msgbox class. —Preceding unsigned comment added by 69.142.233.248 (talk) 00:49, 7 January 2009 (UTC)
- Msgbox is a legacy function, not a class, from VB6-. The proper way is using the Messagebox class, and the Messagebox.Show() function. —Preceding unsigned comment added by 208.38.35.13 (talk) 15:15, 12 June 2009 (UTC)
VBx and Silverlight 2.0
I'd very much like to have the source of this rumour. This is the first time I've heard this claim and I deem it very unlikely indeed, since Silerlight 2.0 is almost finished, whereas VBx has yet to get past the drawing board stage.--84.191.174.114 (talk) 14:33, 16 May 2008 (UTC)
Naming of the technology
The new name for VB.NET is Visual Basic. This is how Micrsoft is marketing the product. --Zoldello (talk) 17:18, 22 May 2008 (UTC)
The My Feature helps developers transitioning from VB6 how, exactly?
'The increased breadth of the [The .NET Framework] is also a problem that VB developers have to deal with when coming to the language, although this is somewhat addressed by the My feature in Visual Studio 2005.'
How does the My namespace help with this exactly?
Example
I've tried the example given in this article, but it reports an error that it cannot find the 'Sub Main'. I inserted 'Shared' before 'Sub Main' and then all worked well.--79.111.116.37 (talk) 00:48, 2 December 2008 (UTC)
- Thank you for pointing this out. Someone made an edit a month ago (25 October) that accidentally broke the code. I've corrected it as you've suggested. The Hello World example would actually be better if coded as a module rather than a class, but it's typical that simple examples are not necessarily good demonstrations of best practices. -- Tcncv (talk) 03:25, 2 December 2008 (UTC)
Why does the Floyd's Triangle example appear to be an example of all the worst programming practices one could fit into a single function? Is is supposed to be an example of all the ways code can be formatted and structured? 174.74.76.83 (talk) 01:25, 30 January 2011 (UTC)
I agree about the Floyd's Triangle example, which is why I re-coded it. Hope they keep it. 198.53.91.205 (talk) 18:32, 9 February 2011 (UTC)
In my VB Express 2010, Floyd's Triangle example needed "Console." before each Write and WriteLine, else it thought it was writing to a file (integer handle) — Preceding unsigned comment added by 88.104.139.128 (talk) 21:28, 12 March 2013 (UTC)
Nominative link
In the infobox on the right there is a link to nominative coding, but on that page there isn't the anchor the link is referring to. —Preceding unsigned comment added by 62.45.201.255 (talk) 18:51, 11 November 2009 (UTC)
- Fixed. Changed link to Nominative type system. -- Tom N (tcncv) talk/contrib 01:15, 12 November 2009 (UTC)