<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:Webdings;
        panose-1:5 3 1 2 1 5 9 6 7 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        mso-fareast-language:EN-US;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle27
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle28
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:595.0pt 842.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-AU" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA">Hi Darren<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA">I haven’t used this very often in c# but something equivalent would be<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA">Array.Resize&lt;T&gt;(ref T myarray, int size)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA">Eg<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA">Array.Resize&lt;cars&gt;(ref myArray, 20) // set size of array to 20<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA">Alternatively I would use<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA">var &nbsp;myCars = new List&lt;cars&gt;();<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA">myCars.Add(new cars());<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA">myCars.Last&lt;cars&gt;().id = “jkhj”;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA">var myarray = myCars.ToArray&lt;cars&gt;(); //if need array<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA">Regards Lony<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D;mso-fareast-language:JA"><o:p>&nbsp;</o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA">From:</span></b><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:JA"> sofdev-bounces@edulists.com.au [mailto:sofdev-bounces@edulists.com.au]
<b>On Behalf Of </b>Darren Scott<br>
<b>Sent:</b> Tuesday, 7 February 2017 8:33 AM<br>
<b>To:</b> Year 12 Software Development Teachers' Mailing List &lt;sofdev@edulists.com.au&gt;<br>
<b>Subject:</b> Re: [Year 12 SofDev] C# - Adding data to an Array from user input<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-AU">VB has a Redim command
</span><span style="font-size:11.0pt;font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:EN-AU">…</span><span style="font-size:11.0pt;mso-fareast-language:EN-AU"> does C# ?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-AU">Something like this?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-indent:36.0pt;text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue;mso-fareast-language:EN-AU">ReDim</span><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-AU">
<span style="color:blue">Preserve</span> thesecars(0 <span style="color:blue">To</span> thiscar)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style="color:green">' keep the data, add one to the array of cars</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; thesecars(thiscar) =
<span style="color:blue">New</span> <span style="color:#2B91AF">cars</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style="color:green">' make a new car</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style="color:blue">With</span> thesecars(thiscar)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:green">
' get info from screen into thiscar</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .id = Val(lblID.Text)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .make = txtMake.Text<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .model = txtModel.Text<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-AU">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span style="color:blue">End</span> <span style="color:blue">With<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-AU">It</span><span style="font-size:11.0pt;font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:EN-AU">’</span><span style="font-size:11.0pt;mso-fareast-language:EN-AU">s probably
 not the cleanest solution </span><span style="font-size:11.0pt;font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:EN-AU">…</span><span style="font-size:11.0pt;mso-fareast-language:EN-AU">
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;mso-fareast-language:EN-AU">Darren<o:p></o:p></span></a></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:JA"><o:p>&nbsp;</o:p></span></p>
<table class="MsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td width="65" style="width:48.75pt;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:JA"><img width="60" height="63" id="_x0000_i1025" src="cid:image002.png@01D28124.D075EA00"><o:p></o:p></span></p>
</td>
<td width="300" style="width:225.0pt;padding:.75pt .75pt .75pt .75pt">
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,sans-serif;color:black;mso-fareast-language:JA">Darren Scott</span><span style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:JA"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:JA">Teacher</span><span style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:JA"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:JA">Catholic College Bendigo</span><span style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:JA"><o:p></o:p></span></p>
</div>
</td>
</tr>
<tr>
<td colspan="2" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><strong><i><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#00946B;mso-fareast-language:JA">'Opening the Doors of Mercy'</span></i></strong><span style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:JA"><o:p></o:p></span></p>
<table class="MsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt"></td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><strong><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:JA">La Valla</span></strong><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:JA"> (Yrs 7-9): Ph: 03 5449 3466</span><span style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:JA"><o:p></o:p></span></p>
</td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><strong><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:JA">Coolock</span></strong><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:JA"> (Yrs 10-12): Ph: 03 5445 9100</span><span style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:JA"><o:p></o:p></span></p>
</td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><strong><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:JA">Finance Office</span></strong><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:JA">: Ph: 03 5445 9191</span><span style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:JA"><o:p></o:p></span></p>
</td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt"></td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-AU">From:</span></b><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-AU">
<a href="mailto:sofdev-bounces@edulists.com.au">sofdev-bounces@edulists.com.au</a> [<a href="mailto:sofdev-bounces@edulists.com.au">mailto:sofdev-bounces@edulists.com.au</a>]
<b>On Behalf Of </b>Cooper, Michael J<br>
<b>Sent:</b> Monday, February 6, 2017 4:35 PM<br>
<b>To:</b> Year 12 Software Development Teachers' Mailing List &lt;<a href="mailto:sofdev@edulists.com.au">sofdev@edulists.com.au</a>&gt;<br>
<b>Subject:</b> Re: [Year 12 SofDev] C# - Adding data to an Array from user input<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">Thanks Ben the list methods seem like a much cleaner way to do it<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"><o:p>&nbsp;</o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:EN-GB">Michael Cooper<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:EN-GB">ICT Co-ordinator &amp; Network Support<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:EN-GB"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:EN-GB"><img border="0" width="223" height="37" id="_x0000_i1026" src="cid:image006.png@01D28124.D075EA00" alt="id:image001.png@01D2440D.0D6FCCA0"><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif"><a href="http://www.Braybrooksc.vic.edu.au">braybrooksc.vic.edu.au</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif">Ph. 9312 2900<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-GB" style="color:black">From: </span></b><span lang="EN-GB" style="color:black">&lt;<a href="mailto:sofdev-bounces@edulists.com.au">sofdev-bounces@edulists.com.au</a>&gt; on behalf of Ben Hines &lt;<a href="mailto:b.hines@ccg.vic.edu.au">b.hines@ccg.vic.edu.au</a>&gt;<br>
<b>Reply-To: </b>Year 12 Software Development Teachers' Mailing List &lt;<a href="mailto:sofdev@edulists.com.au">sofdev@edulists.com.au</a>&gt;<br>
<b>Date: </b>Monday, 6 February 2017 at 2:46 pm<br>
<b>To: </b>Year 12 Software Development Teachers' Mailing List &lt;<a href="mailto:sofdev@edulists.com.au">sofdev@edulists.com.au</a>&gt;<br>
<b>Subject: </b>Re: [Year 12 SofDev] C# - Adding data to an Array from user input</span><span lang="EN-GB" style="color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif"><o:p>&nbsp;</o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">Um,</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">&nbsp;</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">The problem with arrays is that they are made with a fixed size.</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">&nbsp;</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">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.</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">&nbsp;</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">Or you could just use a List&lt;T&gt; 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).</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">&nbsp;</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">Hope that helps!</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">&nbsp;</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">Regards,</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">&nbsp;</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">Ben Hines</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;color:#1F497D">&nbsp;</span><span lang="EN-GB"><o:p></o:p></span></p>
<p id="c1-id-7"><strong id="c1-id-12"><span lang="EN-GB" style="font-family:&quot;Calibri&quot;,sans-serif;color:maroon">Ben Hines</span></strong><b><span lang="EN-GB" style="font-family:&quot;Calibri&quot;,sans-serif;color:maroon"><br id="c1-id-13">
</span></b><span lang="EN-GB" style="font-family:&quot;Calibri&quot;,sans-serif;color:maroon">Mathematics and ICT Teacher<br id="c1-id-15">
Senior School - Waurn Ponds<br id="c1-id-16">
(03)5241 1577</span><span lang="EN-GB" style="font-family:&quot;Arial&quot;,sans-serif"><o:p></o:p></span></p>
<p id="c1-id-17"><span lang="EN-GB" style="font-family:&quot;Calibri&quot;,sans-serif;border:solid windowtext 1.0pt;padding:0cm"><img border="0" width="800" height="120" id="c1-id-25" src="cid:image007.jpg@01D28124.D075EA00" alt="Image removed by sender. hristian College Geelong"></span><span lang="EN-GB" style="font-family:&quot;Arial&quot;,sans-serif"><o:p></o:p></span></p>
<p id="c1-id-26"><b><span style="font-size:16.0pt;font-family:Webdings;border:solid windowtext 1.0pt;padding:0cm"><img border="0" width="34" height="28" id="c1-id-30" src="cid:image008.jpg@01D28124.D075EA00" alt="Image removed by sender."></span></b><strong><span style="font-size:16.0pt;font-family:&quot;Calibri&quot;,sans-serif">&nbsp;</span></strong><span lang="EN-GB" style="font-size:10.0pt;font-family:&quot;Calibri&quot;,sans-serif">Please
 consider the environment&nbsp; before printing this email.</span><span lang="EN-GB" style="font-family:&quot;Arial&quot;,sans-serif"><o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-AU">From:</span></b><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-AU">
<a href="mailto:sofdev-bounces@edulists.com.au">sofdev-bounces@edulists.com.au</a> [<a href="mailto:sofdev-bounces@edulists.com.au">mailto:sofdev-bounces@edulists.com.au</a>]
<b>On Behalf Of </b>Cooper, Michael J<br>
<b>Sent:</b> Monday, 6 February 2017 12:58 PM<br>
<b>To:</b> Year 12 Software Development Teachers' Mailing List &lt;<a href="mailto:sofdev@edulists.com.au">sofdev@edulists.com.au</a>&gt;<br>
<b>Subject:</b> [Year 12 SofDev] C# - Adding data to an Array from user input</span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-GB">&nbsp;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">Hello fellow SD teachers,</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">&nbsp;</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">C# coding question - what is the best way to allow a USER to enter data into an array using a GUI, not the console?</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">&nbsp;</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">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.</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">&nbsp;</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">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.</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">&nbsp;</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">Or am I going about this the wrong way entirely and should be using another technique?</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">&nbsp;</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:EN-GB">Michael Cooper</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:EN-GB">ICT Co-ordinator &amp; Network Support</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:EN-GB">&nbsp;</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:EN-GB"><img border="0" width="223" height="37" id="_x0000_i1029" src="cid:image009.png@01D28124.D075EA00"></span><span lang="EN-GB"><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif"><a href="http://www.Braybrooksc.vic.edu.au">braybrooksc.vic.edu.au</a></span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif">Ph. 9312 2900</span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-GB">&nbsp;<o:p></o:p></span></p>
<table class="MsoNormalTable" border="0" cellspacing="3" cellpadding="0">
<tbody>
<tr>
<td style="background:white;padding:.75pt .75pt .75pt .75pt">
<pre><span style="color:black">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.</span><o:p></o:p></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:EN-AU">&nbsp;</span><span lang="EN-GB"><o:p></o:p></span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:EN-AU">
<hr size="1" width="100%" align="center">
</span></div>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:EN-AU">Message protected by MailGuard: e-mail anti-virus, anti-spam and content filtering.<br>
<a href="http://www.mailguard.com.au">http://www.mailguard.com.au</a><br>
<br>
<a href="https://console.mailguard.com.au/ras/1Qd3zTUEZM/1ibn1N2QYL7pAHC9BDIL3b/0">Report this message as spam</a> &nbsp;<br>
&nbsp;</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:EN-GB"><br>
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.<o:p></o:p></span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:EN-GB">
<hr size="1" width="100%" align="center">
</span></div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-GB" style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:EN-GB">Message protected by MailGuard: e-mail anti-virus, anti-spam and content filtering.<br>
<a href="http://www.mailguard.com.au">http://www.mailguard.com.au</a><br>
&nbsp;<br>
&nbsp;<o:p></o:p></span></p>
<table class="MsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td style="background:white;padding:.75pt .75pt .75pt .75pt">
<pre><span style="color:black">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.<o:p></o:p></span></pre>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="font-family:&quot;Times New Roman&quot;,serif;mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
</div>
</body>
</html>

<table><tr><td bgcolor=#ffffff><font color=#000000><pre>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.</pre></font></td></tr></table>