Reflection, has IsClass but no IsStruct?

后端 未结 1 741
迷失自我
迷失自我 2020-12-21 05:17

How do i check if a Type is a struct? IsClass worked perfectly then my reflection stop behaving as i expected when i change the class to the struct. How do i check if its a

相关标签:
1条回答
  • 2020-12-21 06:09

    Type.IsValueType should do the trick.

    0 讨论(0)
提交回复
热议问题