What does the [] mean in int[], string[], or char[]?


i can not find information on these data types in msdn.

i see these in kinds of code examples. guess array, don't know how use them.

i tried make 1 following:

int = 10;  int b = 11;  int c = 12;    int[] intarraytest;    intarraytest[1] = a;  intarraytest[2] = b;  intarraytest[3] = c;

yet visual studio telling me intarraytest undefined. how these work? seem handy.


mediocre access 2010 | (baby) beginner c sharp | ok @ active directory (2012) | fragmented understanding of dns/dhcp | laughable experience group policy | expert question asker on msdn forums

hello uptide,

an array of object has initialized before can access values inside it.
can initialize array following snippet of code:

int[] intarraytest = new int[length];
length integer (int) value indicates arrays length.
it's length cannot altered after initialization.

working version of code be:
int[] intarraytest = new int[3];  intarraytest[0] = a; intarraytest[1] = b; intarraytest[2] = c;
arrays index starts counting @ zero, shift of indices.


[1] more information regarding arrays

regards,
j. oldoerp
developer-hotline msdn online germany

disclaimer:
please take consideration, further inquiries cannot or answered delay.
for further information please contact per telephone through msdn-entwickler-hotline: http://www.msdn-online.de/hotline
msdn-entwickler-hotline: fast , professional software developers free of charge!

for post msdn-entwickler-hotline following terms , conditions apply: trademarks, privacy separate terms of use msdn-entwickler-hotline.






Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

How to Share webservice object to all user