How can I use Typeof in a dynamic operation?

56 views Asked by At

enter image description here

I wanted to add the question as "code" instead of uploading an image, but I couldn't pass the rules. The question upload system requires me to write pages of detail in order to add the content in the photo as code. Is this really necessary? That's why I had to share it as a picture.

Thanks I used static in:

Type myType2 = typeof(Category); 

I want to use type dynamically like:

var myType = typeof($"{ClassName}") 

Can I do this? Thanks.

0

There are 0 answers