Check out example codes for "array doesnt exist in the current context csharp". It will help you in understanding the concepts better.

Code Example 1

As multiple people in the comments suggested, you are probably missing a using directive.
More specifically using System;.

Learn ReactJs, React Native from akashmittal.com