Array Returning an extra element when running in winforms project

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 2 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Array Returning an extra element when running in winforms project

Post by jvierra »

gkhairallah wrote: Sun May 16, 2021 10:57 am My goal from this is to actually return an array of arrays (?) ... each one containing the 4 values. Due to my lack of knowing how to do it, I'm trying to pass that whole string with "separators", have each object in the loop return one array element (with 4 values in it and the "|" separator which I can process outside of the function). I absolutely realize it's a very clunky way of doing it. Trying to learn how to do it better though :)
PowerShell and forms are "object systems". You are trying to think in strings and old VB arrays. Don't. It will only make everything harder.

You have my code example which does everything in the function, no need for anything else.

Your best project is to understand what my last code post did and why it was done and how to work with objects, methods, properties and events.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Array Returning an extra element when running in winforms project

Post by Alexander Riedel »

Friend of mine and I used punch cards in high school to encode messages the teacher could not read and pass them around :D
Then I worked in a bank in Stuttgart around 1990/1991 and much to my surprise, they still used punch cards. That was when we used 3.5" 1.44MB discs on PCs already.
Oh the good times :D
Alexander Riedel
SAPIEN Technologies, Inc.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Array Returning an extra element when running in winforms project

Post by jvierra »

Alexander Riedel wrote: Sun May 16, 2021 12:32 pm Friend of mine and I used punch cards in high school to encode messages the teacher could not read and pass them around :D
Then I worked in a bank in Stuttgart around 1990/1991 and much to my surprise, they still used punch cards. That was when we used 3.5" 1.44MB discs on PCs already.
Oh the good times :D
Ha! :o 1990? The most hi-tech I got in school was small paper airplanes tossed very carefully across a room. I also grabbed some red phosphorous and made cracker balls and put some on the chemlab handle. The Teacher wasn't very amused.
This topic is 2 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked