[Year 12 SofDev] sofdev Digest, Vol 143, Issue 5
Victoria Farrell
farrellv at stkevins.vic.edu.au
Mon Feb 6 15:52:40 AEDT 2017
I created this example of using Arrays and Dictionaries in VB. Hope this
helps someone.
Vic Farrell
On Mon, Feb 6, 2017 at 2:46 PM, <sofdev-request at edulists.com.au> wrote:
> Send sofdev mailing list submissions to
> sofdev at edulists.com.au
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://www.edulists.com.au/mailman/listinfo/sofdev
> or, via email, send a message with subject or body 'help' to
> sofdev-request at edulists.com.au
>
> You can reach the person managing the list at
> sofdev-owner at edulists.com.au
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of sofdev digest..."
>
>
> Today's Topics:
>
> 1. C# - Adding data to an Array from user input (Cooper, Michael J)
> 2. Re: C# - Adding data to an Array from user input (Ben Hines)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 6 Feb 2017 01:57:35 +0000
> From: "Cooper, Michael J" <cooper.michael.j at edumail.vic.gov.au>
> Subject: [Year 12 SofDev] C# - Adding data to an Array from user input
> To: "Year 12 Software Development Teachers' Mailing List"
> <sofdev at edulists.com.au>
> Message-ID: <89DFBCD1-CAB9-46BE-B23A-E9E3089341EE at edumail.vic.gov.au>
> Content-Type: text/plain; charset="utf-8"
>
> Hello fellow SD teachers,
>
> C# coding question - what is the best way to allow a USER to enter data
> into an array using a GUI, not the console?
>
> I?ve used InputBoxes and loops with Visual Basic, however InputBoxes don?t
> seem to be thing in C#, without adding the Microsoft.VisualBasic namepace.
>
> I can add data to an array during design time easily enough, but I want
> the USER to be able to click on a button and be prompted to enter data,
> which then populates the array.
>
> Or am I going about this the wrong way entirely and should be using
> another technique?
>
> Michael Cooper
> ICT Co-ordinator & Network Support
>
> [id:image001.png at 01D2440D.0D6FCCA0]
> braybrooksc.vic.edu.au<http://www.Braybrooksc.vic.edu.au>
> Ph. 9312 2900
>
>
> IMPORTANT - This email and any attachments may be confidential. If
> received in error, please contact us and delete all copies. Before opening
> or using attachments check them for viruses and defects. Regardless of any
> loss, damage or consequence, whether caused by the negligence of the sender
> or not, resulting directly or indirectly from the use of any attached files
> our liability is limited to resupplying any affected attachments. Any
> representations or opinions expressed are those of the individual sender,
> and not necessarily those of the Department of Education and Training.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://www.edulists.com.au/pipermail/sofdev/attachments/
> 20170206/912b1928/attachment-0001.html
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: image001.png
> Type: image/png
> Size: 9943 bytes
> Desc: image001.png
> Url : http://www.edulists.com.au/pipermail/sofdev/attachments/
> 20170206/912b1928/image001-0001.png
>
> ------------------------------
>
> Message: 2
> Date: Mon, 6 Feb 2017 03:46:24 +0000
> From: Ben Hines <b.hines at ccg.vic.edu.au>
> Subject: Re: [Year 12 SofDev] C# - Adding data to an Array from user
> input
> To: "Year 12 Software Development Teachers' Mailing List"
> <sofdev at edulists.com.au>
> Message-ID: <a53a1e984d4644db9e3ad129afe987b9 at ccg.vic.edu.au>
> Content-Type: text/plain; charset="utf-8"
>
> Um,
>
> The problem with arrays is that they are made with a fixed size.
>
> You can easily have a textbox (or NumericInput) control, then a button
> that adds to the array. You will need to have a counter variable that keeps
> track of where you are in the array.
>
> Or you could just use a List<T> which has methods for adding and removing
> from the list (List is just an array with lots of helpful functions that
> make it easier to use).
>
> Hope that helps!
>
> Regards,
>
> Ben Hines
>
>
> Ben Hines
> Mathematics and ICT Teacher
> Senior School - Waurn Ponds
> (03)5241 1577
>
> [Christian College Geelong]
>
> [https://www.ccg.vic.edu.au/email/images/Enviro.jpg] Please consider the
> environment before printing this email.
> From: sofdev-bounces at edulists.com.au [mailto:sofdev-bounces@
> edulists.com.au] On Behalf Of Cooper, Michael J
> Sent: Monday, 6 February 2017 12:58 PM
> To: Year 12 Software Development Teachers' Mailing List <
> sofdev at edulists.com.au>
> Subject: [Year 12 SofDev] C# - Adding data to an Array from user input
>
> Hello fellow SD teachers,
>
> C# coding question - what is the best way to allow a USER to enter data
> into an array using a GUI, not the console?
>
> I?ve used InputBoxes and loops with Visual Basic, however InputBoxes don?t
> seem to be thing in C#, without adding the Microsoft.VisualBasic namepace.
>
> I can add data to an array during design time easily enough, but I want
> the USER to be able to click on a button and be prompted to enter data,
> which then populates the array.
>
> Or am I going about this the wrong way entirely and should be using
> another technique?
>
> Michael Cooper
> ICT Co-ordinator & Network Support
>
> [id:image001.png at 01D2440D.0D6FCCA0]
> braybrooksc.vic.edu.au<http://www.Braybrooksc.vic.edu.au>
> Ph. 9312 2900
>
>
> IMPORTANT - This email and any attachments may be confidential. If
> received in error, please contact us and delete all copies. Before opening
> or using attachments check them for viruses and defects. Regardless of any
> loss, damage or consequence, whether caused by the negligence of the sender
> or not, resulting directly or indirectly from the use of any attached files
> our liability is limited to resupplying any affected attachments. Any
> representations or opinions expressed are those of the individual sender,
> and not necessarily those of the Department of Education and Training.
>
>
> ________________________________
> Message protected by MailGuard: e-mail anti-virus, anti-spam and content
> filtering.
> http://www.mailguard.com.au
>
> Report this message as spam<https://console.mailguard.com.au/ras/
> 1Qd3zTUEZM/1ibn1N2QYL7pAHC9BDIL3b/0>
>
> --
> This e-mail is intended for the use of the named individual or entity and
> may contain confidential and privileged information. Any dissemination,
> distribution or copying by anyone other than the intended recipient of this
> e-mail is strictly prohibited. If this e-mail has been received in error,
> then please notify Christian College or the author of this email
> immediately and destroy the original message. We have made every attempt to
> ensure this e-mail message is free from computer viruses however the
> attached files are provided on the basis that the user assumes all
> responsibility for use of the material transmitted. Views, opinions, etc.
> expressed reflect those of the author and not Christian College nor its
> associated companies and campuses which includes Eden Quality Services Pty
> Ltd.
>
> Message protected by MailGuard: e-mail anti-virus, anti-spam and content
> filtering.
> http://www.mailguard.com.au
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://www.edulists.com.au/pipermail/sofdev/attachments/
> 20170206/130837fd/attachment.html
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: image002.png
> Type: image/png
> Size: 15253 bytes
> Desc: image002.png
> Url : http://www.edulists.com.au/pipermail/sofdev/attachments/
> 20170206/130837fd/image002.png
>
> ------------------------------
>
> _______________________________________________
> sofdev mailing list
> sofdev at edulists.com.au
> http://www.edulists.com.au/mailman/listinfo/sofdev
>
>
> End of sofdev Digest, Vol 143, Issue 5
> **************************************
>
--
This email message does not represent the view of St Kevins College, is
intended only for the addressee(s) and contains information that may be
confidential and/or copyright. If you are not the intended recipient please
notify the sender by reply email and immediately delete this email. Use,
disclosure or reproduction of this email by anyone other than the intended
recipient(s) is strictly prohibited. No representation is made that this
email or any attachments are free of viruses. Virus scanning is recommended
and is the responsibility of the recipient.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.edulists.com.au/pipermail/sofdev/attachments/20170206/ff2c4b49/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Arrays Dictionaries.docx
Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
Size: 284436 bytes
Desc: not available
Url : http://www.edulists.com.au/pipermail/sofdev/attachments/20170206/ff2c4b49/ArraysDictionaries-0001.docx
More information about the sofdev
mailing list