I have this register that registers all the objects I need:
public static class ObjectRegister
{
public static List RegisteredObjects = new Li
This is your problem, in Object1:
public parametar param { get { return this.param; } set { this.param = value; }
That property calls itself recursively - which is exactly why you're getting a stack overflow. Don't do that. Instead, you probably either want an automatically-implemented property:
public parameter param { get; set; }
or use a private backing field:
private parametar param;
public parametar Param { get { return param; } set { param = value; }
Additionally, I'd strongly recommend that you start following .NET naming conventions, and pay attention to spelling in type and member names.
So you probably want your class to be called Parameter
- although personally I'd at least try to make it a little bit more descriptive, e.g. QueryParameter
or something similar. Likewise Object1
isn't exactly a semantically-meaningful name - I hope it's not the name in your real code.