Instantiating objects from a class? (C#)

Sorry if this is kind of a general C# question, but I’ve been having a lot of trouble with this, and I’ve only done class declarations and instantiation in C++, not C# or Unity, for that matter.

Long story short: I need to have a two-dimensional array of two dimensional integer arrays, and I’ve decided that the best way of accomplishing this is by creating a class that contains a two-dimensional integer array, and then having an array of objects of that class.

The problem is that I’m having a lot of trouble figuring out how to create my class and how to instantiate objects from it. If it helps, here’s what the code for my class, which we’ll call MyClass, looks like:

using System.Collections;
namespace ClassOfMine
{
	public class MyClass
	{
		int[,] contents = new int[10,10];
		
		public MyClass ()
		{
			contents = new int[10,10]{
				{0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0},
			};
		}
		
		public int GetValue(int x, int y)
		{
			return contents[x,y];
		}
		
		public void SetValue(int x, int y, int n)
		{
			contents[x,y] = n;
		}
	}
}

I just need a kick in the right direction or something, I guess. I’m not sure how to instantiate a MyClass object in my other scripts. Any help is appreciated! Thanks!

MyClass obj = new MyClass();

Is this what you’re after?

2D:

MyClass[,] obj = new MyClass[10,10];
for (int i = 0; i < obj.GetLength(0); ++i)
    for (int j = 0; j < obj.GetLength(1); ++j)
        obj[i, j] = new MyClass();