jeudi 30 juillet 2020

C# System.Reflection.Emit: How can I generate a type with a property of the same type that is being defined (like a TreeNode class)

I need to create a new type in a dynamic assembly using the c# System.Reflection.Emit namespace. This type contains a property of the same type as the one I need to define. Think about a parent / child kind of type:

public class Node 
{
   public Node ChildNode {get; set;}
}

How can I do this?

Regards, H





Aucun commentaire:

Enregistrer un commentaire