Create a custom variable type in C#

I just need to find out how to make a custom type in C#. Like in javascript it looks like this :

class Randomness (){
Public var name : string;
Public var action : int;

And then you can do something like this in another script :

public var random[] : Randomness;

And then you can edit it in the inspector to make as many “*Randomness Arrays” As you want.

So I really want to be able to make a custom array that you can edit in the inspector.
And I have tried using structs but they don’t show up in the inspector and when its “class whatever” it shows up in the inspector but it asks for a MonoBehaviour.

You do it the same way in c# only difference is the syntax:

public class Randomness{
public string name;
public int action;

public Randomness[] random;

You can also use structs.
See here for the differences between them.
Note C# arrays are not intended to change length during run-time, use List<> instead if you need to add/remove items from your array.