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

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -