title: Coding an array in a class library and make a call to it C#
body: <p>I'm new to C#, so this may be a basic question. What I need to do is put an array such as the one below in a class library and then make a call to it. So I'd want the appropriate picture to appear via the class and this array. I know there's a much simpler way to make certain pictures appear, but this is a requirement for the project. It's an asp.NET website in C#.</p>
  
  <pre><code>string[] PictureArray;
  
  PictureArray = new string[3];
  PictureArray[0] = "~/pics/grl.jpg";
  PictureArray[1] = "~/pics/pop.jpg";
  PictureArray[2] = "~/pics/str.jpg";
  PictureArray[3] = "~/pics/unk.jpg";
  </code></pre>
  
  <p><strong>EDIT (also in comment):</strong><br>
  I'm trying to get the picture from the array to show up in an image box upon a button click like this: </p>
  
  <pre><code>protected void Button1_Click(object sender, EventArgs e) { 
     Class1 name = new Class1(); 
     this.Image1.ImageUrl = name.GetPic(); 
  }
  </code></pre>
  
  <p>Obviously just the name.GetPic() isn't going to do anything, it's throwing an error actually. </p>
  
  <p><strong>EDIT2:</strong> Sorry for the confusion, I just realized I can edit and comment. I've got the array in the class properly setup, now I need to access it (read above edit).</p>
  
  <p>Answered</p>
  
  <pre><code>string[] pictures = work.GetPictures();
  Image1.ImageUrl = pictures[0];
  </code></pre>
  
  <p>is all that I needed to see, thanks Zyphrax</p>