2

How do I tell what version of Objective-C I'm using? I'm using a Mac with xCode. The reason I ask is because i have a book "Objective-C 3.0" and it says that you can declare an multidimensional array like this.

int[,] num = new int[2,2];

When I try to do this I get a syntax error. Do I need to import another header other than foundation?

Sreekanth
  • 315
  • 3
  • 16

3 Answers3

6

Have you tried changing

new int[2.2]

to

new int[2,2]

?

Walt W
  • 3,193
  • 2
  • 28
  • 37
0

I think Walt's answer is right, but here's a good resource for determining which version of C# you're using with your .NET install (thanks to Jon Skeet's "C# In Depth" book!):

http://csharpindepth.com/Articles/Chapter1/Versions.aspx

Andy White
  • 84,168
  • 47
  • 173
  • 207
0

Are you sure that you are programming in C# and not Objective C? Importing foundation is something you would do in Objective C, not C#.

shf301
  • 30,640
  • 2
  • 50
  • 86