-
Feb 8th, 2021, 01:35 PM
#281
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by NeedSomeAnswers
...look a little dated, with the yellow backgrounds
It's the yellow? All this time I couldn't figure it out, lol! You got a problem with yellow? What are you a "colorist"?!?
But seriously...
This isn't a website - this is a desktop application for all intents and purposes. What color do you typically make your backgrounds in VB6 or .Net for your simple database applications?
-
Feb 8th, 2021, 02:22 PM
#282
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Beauty is in the eye of the beholder. lol
But I am confused about "Enter 7 Digit Id" but your Id template is "xxaa" . The fact that it has nothing at all to do with what you were trying to show, I felt compelled to point that little oddity out. I fill bad but I'm gonna post it anyway.
-
Feb 8th, 2021, 02:33 PM
#283
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by wes4dbt
But I am confused about "Enter 7 Digit Id" but your Id template is "xxaa" \
That was just "test" data to make sure I named the UI element correctly to bind to the JSON output. The label containing that "xxaa" starts off "empty" in real use and then fills with "results" of clicking that button.
When you live in the browser / html world like this, you tend to make a small change, run it - see that it works, and move along. At least that's my technique.
I really am curious as to what kfc felt so strongly about that he had to bash it twice, lol!
-
Feb 8th, 2021, 05:01 PM
#284
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by szlamany
It's the yellow?
...
What color do you typically make your backgrounds in VB6 or .Net for your simple database applications?
Erm, everything *but* yellow ...
Well... if it has to be... "yellow-ish", then surrounded by nice red-ish, bronce-ish patterns,
until you get a good "steam-punk-look" going (I'm sure Students will love that...
We have an expert here on this board (yereverluvinuncleber), who knows (t)his art -
and as a background-theme-suggestion (including yellow parts) you might start with this:
https://www.deviantart.com/yereverlu...-PIM-453814094
HTH
Olaf
-
Feb 8th, 2021, 05:31 PM
#285
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
I've frequently stated that I have no artistic talent, and I may be known for garish backgrounds, so, it might concern you if I said it looked fine to me, but...purple on yellow? Wasn't there something in Shakespeare about that particular color combination? Something from A Midsummer Night's Dream, perhaps?
Nope, it was Malvolio in Twelfth Night, and while his stockings were yellow, the purple garters are up to the costume director.
Last edited by Shaggy Hiker; Feb 8th, 2021 at 05:36 PM.
My usual boring signature: Nothing
-
Feb 8th, 2021, 06:09 PM
#286
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Schmidt
Erm, everything *but* yellow ...
Originally Posted by Shaggy Hiker
I've frequently stated that I have no artistic talent, and I may be known for garish backgrounds, so, it might concern you if I said it looked fine to me, but...purple on yellow? Wasn't there something in Shakespeare about that particular color combination? Something from A Midsummer Night's Dream, perhaps?
Apparently yellow is a controversial color - maybe I can guess at a reason or two, lol!
I'm actually color deficient, so purple isn't one of those colors that I can distinguish so easily!
fwiw - the BLUE buttons open new tabs and the PURPLE buttons perform an action...
Last edited by szlamany; Feb 8th, 2021 at 06:21 PM.
-
Feb 9th, 2021, 11:12 AM
#287
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
I had a boss who was red/green color blind, and an employee who was totally color blind. I had created a VERY colorful interface for use in a very bright environment. Listening to those two try to figure out which buttons had the same color and which were different was...entertaining.
Black on Yellow is the highest contrast our eyes can distinguish. It tends to be superior to black on white, even. However, if contrast isn't the point, other options abound. When looking up that Shakespeare reference (I remembered yellow hose with purple garters, but it's actually yellow hose with CROSS garters, and I've only ever seen them be purple in plays), I found that yellow hose had a meaning back then. It was an indication of something like marital infidelity, or perhaps sexual promiscuity.
So...your interface is a tramp.
My usual boring signature: Nothing
-
Feb 9th, 2021, 01:23 PM
#288
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
This thread is almost as funny as the kids in these videos:
... just not as grounded in reality.
-
Feb 9th, 2021, 05:42 PM
#289
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Schmidt
We have an expert here on this board (yereverluvinuncleber), who knows (t)his art
To be quoted by you as an expert for anything on this board, Olaf, I am truly humbled.
-
Feb 9th, 2021, 09:03 PM
#290
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Shaggy Hiker
I've frequently stated that I have no artistic talent, and I may be known for garish backgrounds,
Does your software come with free sunglasses?
Last edited by Peter Porter; Feb 9th, 2021 at 09:04 PM.
Reason: typos
-
Feb 10th, 2021, 06:24 AM
#291
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
A quick something I wanted to share about vb.net vs other languages:
The few times I need to get something done at work using a script, I can choose from VBA/VBScript/Batch/possibly Javascript or one of the languages supported by the preinstalled .NET framework. There is a folder in the Windows folder called .\Microsoft.net\Framework - which I believe is already obsolete by now, but anyway I had limited choices as what to use. So I had to make a choice once, and it was VB.NET.
Here was very quick and short script I made on the fly:
Code:
Option Compare Binary
Option Explicit On
Option Infer Off
Option Strict On
Imports System
Imports System.Collections.Generic
Imports System.Environment
Imports System.IO
Public Module CoreModule
Public Sub Main ()
Dim Afdelingen As New List(Of String)(File.ReadAllLines(GetCommandLineArgs.Last))
Afdelingen.ForEach(Sub(Item As String) Console.WriteLine(Item.SubString(Item.LastIndexOf("/"c) + 1)))
End Sub
End Module
I had to process some huge amount of data in some Microsoft Excel sheet. The columns had to be rearranged. If I recall correctly I moved everything to a text file for processing by my script and back to Excel sheet. Feel free to disagree but I say that except for perhaps C# this task would have been far more tedious.
There you have it, an actual non-hobbyist example. And it seemed to waste to throw away this script while cleaning my drive.
yours,
Peter Swinkels
Last edited by Peter Swinkels; Feb 13th, 2021 at 10:44 AM.
Reason: I really must learn to proof read before posting.
-
Feb 10th, 2021, 07:00 AM
#292
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by szlamany
It's the yellow? All this time I couldn't figure it out, lol! You got a problem with yellow? What are you a "colorist"?!?
Haha, yes the yellow but also the alignment and buttons too.
But seriously...
This isn't a website - this is a desktop application for all intents and purposes. What color do you typically make your backgrounds in VB6 or .Net for your simple database applications?
Which makes sense, from a web design point of view it looks dated but as you've just stated considering its use that maybe just not important.
I don't write desktop apps anymore I haven't even supported any for several years now. All our customers want hosted reactive web applications.
I will try and grab a couple of screenshots of our main application at some point and post them.
Please Mark your Thread "Resolved", if the query is solved & Rate those who have helped you
-
Feb 10th, 2021, 07:59 AM
#293
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Peter Swinkels
Here was very quick and short script I made on the fly:
Code:
Option Compare Binary
Option Explicit On
Option Infer Off
Option Strict On
Imports System
Imports System.Collections.Generic
Imports System.Environment
Imports System.IO
Public Module CoreModule
Public Sub Main ()
Dim Afdelingen As New List(Of String)(File.ReadAllLines(GetCommandLineArgs.Last))
Afdelingen.ForEach(Sub(Item As String) Console.WriteLine(Item.SubString(Item.LastIndexOf("/"c) + 1)))
End Sub
End Module
...
Feel free to disagree but I say that except for perhaps C# this task would have been for more tedious.
Not at all (it'd be equally easy with COM-based languages like VBScript/VBA/VB6).
Here is the equivalent code for a VBScript version:
E.g. when using CScript (the Console-based ScriptHost):
Code:
sFile = Wscript.Arguments(Wscript.Arguments.Count-1)
Set Strm = CreateObject("Scripting.FileSystemObject").OpenTextFile(sFile)
Do Until Strm.AtEndOfStream
Item = Strm.ReadLine
WScript.Echo Mid(Item, InstrRev(Item, "/") + 1)
Loop
Alternatively, when using WScript as the ScriptHost (which is the default on most systems),
one has to add that little If-condition-part in between (to dynamically switch to console-mode).
Code:
sFile = Wscript.Arguments(Wscript.Arguments.Count-1)
If InStr(1, WScript.FullName, "cscript.exe", 1) = 0 Then 'started in WScript-Mode, so dynamically re-shell in console-mode
CreateObject("WScript.Shell").Run "%comspec% /k cscript /NoLogo """ & WScript.ScriptFullName & """ """ & sFile & """"
WScript.Quit
End If
Set Strm = CreateObject("Scripting.FileSystemObject").OpenTextFile(sFile)
Do Until Strm.AtEndOfStream
Item = Strm.ReadLine
WScript.Echo Mid(Item, InstrRev(Item, "/") + 1)
Loop
HTH
Olaf
-
Feb 10th, 2021, 10:01 AM
#294
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Peter Porter
Does your software come with free sunglasses?
Sunglasses aren't enough. It comes with several quarts of whiskey.....it's very popular software, I'm not quite sure why.
My usual boring signature: Nothing
-
Feb 10th, 2021, 07:42 PM
#295
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Shaggy Hiker
Sunglasses aren't enough. It comes with several quarts of whiskey.....it's very popular software, I'm not quite sure why.
Well I can help ya with the look of your software. Artwise, I can do about anything. Besides designs in VB.Net, I'm an expert graphic designer in Photoshop. Love video editing. And every now and then draw life-like art.
All I would need is a screen capture of your work to slap a front-end together in VB.
-
Feb 11th, 2021, 01:05 AM
#296
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Peter Porter
Well I can help ya with the look of your software. Artwise, I can do about anything. Besides designs in VB.Net, I'm an expert graphic designer in Photoshop. Love video editing. And every now and then draw life-like art.
All I would need is a screen capture of your work to slap a front-end together in VB.
give Niya a hand, we are still waiting for the video's
couldn't resist, look's like the Thread is dead now
to hunt a species to extinction is not logical !
since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.
-
Feb 11th, 2021, 06:51 AM
#297
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Schmidt
Not at all (it'd be equally easy with COM-based languages like VBScript/VBA/VB6).
Here is the equivalent code for a VBScript version:
E.g. when using CScript (the Console-based ScriptHost):
Code:
sFile = Wscript.Arguments(Wscript.Arguments.Count-1)
Set Strm = CreateObject("Scripting.FileSystemObject").OpenTextFile(sFile)
Do Until Strm.AtEndOfStream
Item = Strm.ReadLine
WScript.Echo Mid(Item, InstrRev(Item, "/") + 1)
Loop
Alternatively, when using WScript as the ScriptHost (which is the default on most systems),
one has to add that little If-condition-part in between (to dynamically switch to console-mode).
Code:
sFile = Wscript.Arguments(Wscript.Arguments.Count-1)
If InStr(1, WScript.FullName, "cscript.exe", 1) = 0 Then 'started in WScript-Mode, so dynamically re-shell in console-mode
CreateObject("WScript.Shell").Run "%comspec% /k cscript /NoLogo """ & WScript.ScriptFullName & """ """ & sFile & """"
WScript.Quit
End If
Set Strm = CreateObject("Scripting.FileSystemObject").OpenTextFile(sFile)
Do Until Strm.AtEndOfStream
Item = Strm.ReadLine
WScript.Echo Mid(Item, InstrRev(Item, "/") + 1)
Loop
HTH
Olaf
My, I didn't expect anyone to reply. :-) VB6 wasn't available. And yes, it could have been done with one of those scripting languages too. Vb.net just felt the easiest for me personally at that moment. Remember, I was at work and had to get something done quickly. If I had been at home doing this in my spare time, I might have actually gone so far as to try to pull this GWBasic running DOSBox just for the sheer challenge and satifsfaction of getting the task done with an obsolete primitive language.
-
Feb 12th, 2021, 12:18 PM
#298
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by ChrisE
give Niya a hand, we are still waiting for the video's
couldn't resist, look's like the Thread is dead now
Very busy at the moment with stuff more important than winning an argument online. But I will do as I said I'll do. Just cant focus on that at this moment. Don't worry. We will get into it when I have some free time. Which should be soon.
-
Feb 12th, 2021, 12:26 PM
#299
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Didn't really have time to go through all the recent discussion since my last post but I did quickly catch this:-
Originally Posted by Schmidt
Not at all (it'd be equally easy with COM-based languages like VBScript/VBA/VB6).
Here is the equivalent code for a VBScript version:
E.g. when using CScript (the Console-based ScriptHost):
Code:
sFile = Wscript.Arguments(Wscript.Arguments.Count-1)
Set Strm = CreateObject("Scripting.FileSystemObject").OpenTextFile(sFile)
Do Until Strm.AtEndOfStream
Item = Strm.ReadLine
WScript.Echo Mid(Item, InstrRev(Item, "/") + 1)
Loop
Alternatively, when using WScript as the ScriptHost (which is the default on most systems),
one has to add that little If-condition-part in between (to dynamically switch to console-mode).
Code:
sFile = Wscript.Arguments(Wscript.Arguments.Count-1)
If InStr(1, WScript.FullName, "cscript.exe", 1) = 0 Then 'started in WScript-Mode, so dynamically re-shell in console-mode
CreateObject("WScript.Shell").Run "%comspec% /k cscript /NoLogo """ & WScript.ScriptFullName & """ """ & sFile & """"
WScript.Quit
End If
Set Strm = CreateObject("Scripting.FileSystemObject").OpenTextFile(sFile)
Do Until Strm.AtEndOfStream
Item = Strm.ReadLine
WScript.Echo Mid(Item, InstrRev(Item, "/") + 1)
Loop
HTH
Olaf
This is way too verbose compared to what Peter posted.
Anyways. See you guys soon.
-
Feb 12th, 2021, 12:33 PM
#300
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
-
Feb 13th, 2021, 06:07 AM
#301
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Niya
This is way too verbose compared to what Peter posted.
Not at all...
Here again Peters original code (which lists all lines from a File, passed as a Parameter):
Code:
Option Compare Binary
Option Explicit On
Option Infer Off
Option Strict On
Imports System
Imports System.Collections.Generic
Imports System.Environment
Imports System.IO
Public Module CoreModule
Public Sub Main ()
Dim Afdelingen As New List(Of String) _
(File.ReadAllLines(GetCommandLineArgs.Last))
Afdelingen.ForEach(Sub(Item As String) _
Console.WriteLine(Item.SubString(Item.LastIndexOf("/"c) + 1)))
End Sub
End Module
And here again the VBScript-version:
Code:
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Strm = FSO.OpenTextFile(Wscript.Arguments(0))
Do Until Strm.AtEndOfStream
Line = Strm.ReadLine
WScript.Echo Mid(Line, InstrRev(Line, "/") + 1)
Loop
Or (FWIW) the VB6-Version...
(using a different helper-class - the RC5/6 FileSystem-Object instead of the "Scripting.FileSystemObject"):
Code:
Option Explicit
Sub Main()
Dim Line
For Each Line In Split(New_c.FSO.ReadTextContent(Command$), vbCrLf)
Debug.Print Mid(Line, InStrRev(Line, "/") + 1)
Next
End Sub
Again, coding-efficiency comes primarily from libraries (not from "language-features").
Usage of (COM-)libs is, what makes the VBScript-Code efficient, and it is what makes the VB6-Code efficient.
You've still not understood that simple truth.
This is not different from the .NET-version, because these instructions:
Imports System
Imports System.Collections.Generic
Imports System.Environment
Imports System.IO
... ensure "the loading of lib-dependencies under certain namespaces"
Olaf
-
Feb 13th, 2021, 09:46 PM
#302
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Ok boys......I think I'm back. Gonna pick up where I left off soon...
-
Jun 15th, 2021, 02:20 PM
#303
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Ok folks. Some recent developments stopped me in my tracks and I had to do a lot of thinking. As fun and interesting as all this was, the aforementioned recent developments have forced me to realize that all of this is quite pointless. It seems I wasn't paying close enough attention to how quickly things are changing and once again, I stayed static for way too long simply because I was comfortable in where I was, just I was when I took too long to move from VB6.
Desktop development is dead. That time is here. And if I'm to remain competent in this field I must evolve and I must do it now. The world is more or less completely overtaken by web and mobile applications. I didn't fully appreciate just how far the web applications have come in a few short years. They can almost do every thing a desktop application can do with the huge advantage of being very easily accessible and platform agnostic. Online subscription services to web applications seems to be quickly becoming the norm. Nobody is installing anything anymore.
As such, I've made the decision to abandon desktop programming and VB for good. As of a few weeks ago, I've been exploring the world of web applications and was quite fascinated at the possibilities. And while I'm new to this world, I'm going to devote all my programming time to learning it just as well as I know the world of Windows programming. For now, I'm staying close to home with Microsoft by looking into Blazor and I'm keeping an eye on .Net MAUI's development. For the foreseeable future, I will be using a combination of C# with technologies like ASP.Net, Blazor and Xamarin. I may also look at non-Microsoft frameworks like Angular and Flutter if I see something there.
The point is, if I want to remain on the cutting edge of what your average user expects these days, then for all intents and purposes VB is dead. Desktop is dead. That means VB6, WinForms, WPF, all of it. All of Microsoft's web and mobile development tools are C# only. There is no point in shooting myself in the foot by staying in the BASIC language. Outside of MS, Python, Typescript and JavaScript is where all the action is. In light of this, it seems quite ridiculous to me to compare VB6 to VB.Net. Both of these are aging relics and in todays world, it really doesn't matter one lick which one is better. This world is the past.
So this is it for my participation in these kinds of discussions. It was fun and interesting and I hope there are no hard feelings. I tend to be very passionate about things I like but I do have a lot of respect for all of you despite how I might have come across sometimes. I wish I could keep doing what I've been doing and I wish I could do it forever. I really do love Windows programming but I cannot stay in this domain any longer and remain competitive.
-
Jun 15th, 2021, 02:31 PM
#304
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
-
Jun 15th, 2021, 02:41 PM
#305
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by yereverluvinuncleber
You'll be back!
I'll still be around here. I will still be using .Net and Visual Studio after all, but I just won't be using VB anymore, nor will I be writing desktop applications.
-
Jun 15th, 2021, 07:35 PM
#306
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
I have a system based on plugins. Do that on the web. You can't, really. A truly extensible system is currently precluded on the web because the code all has to run on a web server. I don't believe that Blazor or any other WASM solution has any realistic chance to change that.
Desktop isn't dead, it's just that the vast majority of applications do make more sense on mobile/web. Still, there remain certain domains that do not work on the web.
My usual boring signature: Nothing
-
Jun 16th, 2021, 08:36 AM
#307
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
I'm back to doing desktop after several years of doing DB only so there is some life still in it. Not going to lie, though, the app I'm working on is very niche and I wouldn't be looking at desktop if I were starting my career now.
I don't have a hunger to move to web and every time I try I just find it too frustrating and give up. Thankfully the current contract plus a few DB side hustles should see me clear to an early retirement.
The best argument against democracy is a five minute conversation with the average voter - Winston Churchill
Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd
-
Jun 16th, 2021, 12:51 PM
#308
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Shaggy Hiker
I have a system based on plugins. Do that on the web. You can't, really. A truly extensible system is currently precluded on the web because the code all has to run on a web server. I don't believe that Blazor or any other WASM solution has any realistic chance to change that.
Desktop isn't dead, it's just that the vast majority of applications do make more sense on mobile/web. Still, there remain certain domains that do not work on the web.
Desktop is not dead dead. I know that. Certain types of applications can only work as desktop applications but we are primarily in line of business applications and it just seems that there is no reason not to do them as web applications. You gain so much and give up so little going in this direction. For example, you gain platform independence which in huge in today's world where there are all kinds of devices. People want to the freedom to access their stuff from anywhere they want. With a web application facing the internet, all they would need is a web browser and they can use your application from whatever device they want. It's very hard to compete with that kind of flexibility when your application can only run on Windows. Then there are technologies like Electron and the up and coming Blazor hybrid applications which allow you to deploy web applications as Windows desktop applications, iOS and Android applications. The advantage here is that you write your application only once and you can deploy it in a wide variety of ways.
-
Jun 16th, 2021, 12:56 PM
#309
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by FunkyDexter
I don't have a hunger to move to web and every time I try I just find it too frustrating and give up.
I really wish I didn't have move to the web but at this point it seems inevitable, at least for us. People are asking for things that require too much gymnastics to implement in a desktop application. At some point, you realize that when you see a nail, you use a hammer. No sense trying to shoehorn a screwdriver into driving a nail.
-
Jun 16th, 2021, 07:04 PM
#310
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
The plugin system I'm working on is an improvement on a couple systems that people spent literally millions of dollars on...to make them web based.
While I basically agree that lots of things make far more sense on the web, there is a tendency to then jump to "everything should be on the web", which prompts people to make mistakes. In my case, I have a niche application which could be on the web so long as you were willing to ignore one of the most important and annoying features of the problem: The wild diversity of data stories. The problem domain is one in which you will always have to make a choice as to what to leave in and what to leave out, and whatever choice you make is guaranteed to be the wrong one sooner or later, since the data needs will be constantly changing. The plugin nature of my approach allows for the application to adapt much like Lego systems, where new pieces can always be fit on so long as the interface remains the same, and thus, much like new franchises (often movie franchises) prompt the creation of new Lego sets, the application can adjust to meet new needs.
However, a casual glance at the problem can result in people seeing the bottom line: There really IS a part of it which should be web, it's just that nobody can write that part. The data should be on the web. I saw that back in the 90s, before the web was really the thing. Some people then made the leap from saying that, since the output needs to be on the web, the input should also be on the web, which wasn't the case....and they didn't look long enough to realize that the output....is going to be a massive headache for anybody who tries to create it, web or otherwise. Just how DO you create some coherent output when you have lots of little data stories, which some will want to see independent of one another, while others will want to see the interactions between some arbitrary set of them?
Web where web is appropriate, non-web where non-web is appropriate, and retirement at the end of things. That's how it should be.
I'd also point out that I work in an area where web is often unavailable, but it would be fair to note that saying so is stating only the current situation. If Google puts up a viable satellite system, what is reasonable could shift radically in the next few years....once again. Doesn't impact my plugins, but it impacts some other things I've written.
My usual boring signature: Nothing
-
Aug 24th, 2021, 04:00 PM
#311
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Niya
VB.Net
Code:
Dim names As String() = {"James", "Janet", "Marcus"}
Is that valid in VB.Net?
(are the brackets in that place allowed? anyone can confirm? I don't have .Net to test)
I would have guessed this to be valid:
Code:
Dim names() As String = {"James", "Janet", "Marcus"}
-
Aug 24th, 2021, 04:23 PM
#312
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Eduardo-
Is that valid in VB.Net?
(are the brackets in that place allowed? anyone can confirm? I don't have .Net to test)
I would have guessed this to be valid:
Code:
Dim names() As String = {"James", "Janet", "Marcus"}
This is where the loosey gooseyness comes in... If I remember right... both are valid... you can declare an array by parens on either the variable name... OR on the type name...
-tg
-
Aug 24th, 2021, 04:36 PM
#313
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by techgnome
This is where the loosey gooseyness comes in... If I remember right... both are valid... you can declare an array by parens on either the variable name... OR on the type name...
-tg
Yep, both are considered valid and will produce the same underlying type. The tooltips in Visual Studio show it as
Code:
Dim names As String() = {"James", "Janet", "Marcus"}
regardless of which way you define it though.
-
Aug 24th, 2021, 05:29 PM
#314
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Eduardo-
Is that valid in VB.Net?
(are the brackets in that place allowed? anyone can confirm? I don't have .Net to test)
I would have guessed this to be valid:
Code:
Dim names() As String = {"James", "Janet", "Marcus"}
As TN and PD said, both are valid. I prefer the newer style with the brackets on the right hand side because I like having all the type information in one place. String() communicates both that it is a String type and that it's an array.
-
Aug 24th, 2021, 08:27 PM
#315
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
OK... a bit strange because I believe that a rule in programming languages is: one way to do something and not several ways to do the same thing.
Thanks for the clarification.
-
Aug 24th, 2021, 08:37 PM
#316
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Eduardo-
...and not several ways to do the same thing.
it's like .ToString or .ToString() that seems to both be allowed!
How about OPTION STRICT NO STUPID
to turn off this wrongness!
-
Aug 24th, 2021, 08:54 PM
#317
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Eduardo-
OK... a bit strange because I believe that a rule in programming languages is: one way to do something and not several ways to do the same thing.
Thanks for the clarification.
I believe they left that god awful older syntax to accommodate VB6 and VBA programmers.
Originally Posted by szlamany
it's like .ToString or .ToString() that seems to both be allowed!
How about OPTION STRICT NO STUPID
to turn off this wrongness!
Yea, I hate that about VB.Net. Function calls should be bracketed for consistency! C# doesn't allow that nonsense though.
-
Aug 24th, 2021, 08:59 PM
#318
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
I think it is not the same thing to allow empty unneeded optional parenthesis (VB6 also allow things like that) than to allow two ways to declare arrays, because the parenthesis are needed for the declaration, and I see that you can place them in two different places.
What happen if add them in both places, like this?:
Code:
Dim names() As String() = {"James", "Janet", "Marcus"}
-
Aug 24th, 2021, 09:29 PM
#319
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Eduardo-
What happen if add them in both places, like this?:
Code:
Dim names() As String() = {"James", "Janet", "Marcus"}
The IDE/compiler complains about it:-
It's not allowed. It's one or the other.
-
Aug 24th, 2021, 09:38 PM
#320
Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....
Originally Posted by Eduardo-
I think it is not the same thing to allow empty unneeded optional parenthesis
My problem with optional brackets for function calls is that it is ambiguous and I have actually been confused by VB code sometimes because of it:-
Code:
Dim data As Byte() = ReceiveData 'Is this a variable or function call?
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
|