C# Get Generic Type Name -
i need way name of type, when type.isgenerictype
= true
.
type t = typeof(list<string>); messagebox.show( ..?.. );
what want, message box pop list
showing... how can that?
type t = ...; if (t.isgenerictype) { type g = t.getgenerictypedefinition(); messagebox.show(g.name); // displays "list`1" messagebox.show(g.name.remove(g.name.indexof('`'))); // displays "list" }
Comments
Post a Comment