2 Replies - 225 Views - Last Post: 15 November 2012 - 07:35 PM Rate Topic: -----

#1 rubydazey5  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 14-November 12

C# Aray help

Posted 14 November 2012 - 05:44 PM

What am I doing wrong here. I am trying to call the first number in an Array that was filled by user input.


  i = aNum.GetValue {0};
            Console.WriteLine("The first value entered was: " + i );




Do you need more of the code than this?

rubeydazey5

This post has been edited by Curtis Rutland: 15 November 2012 - 07:21 AM

Is This A Good Question/Topic? 0
  • +

Replies To: C# Aray help

#2 Momerath  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 996
  • View blog
  • Posts: 2,403
  • Joined: 04-October 09

Re: C# Aray help

Posted 14 November 2012 - 06:02 PM

{} aren't used for array access or method calls. If aNum is an array, then you just need to do
i = aNum[0];
assuming i has been defined elsewhere.
Was This Post Helpful? 3
  • +
  • -

#3 rubydazey5  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 14-November 12

Re: C# Aray help

Posted 15 November 2012 - 07:35 PM

how simple! Thanks
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1