In C# are the terms “Primitive” and “Literal” interchangeable?

前端 未结 8 741
[愿得一人]
[愿得一人] 2021-02-07 20:43

A discussion earlier today led me to question whether or not my understanding of primtives and literals is correct.


My understanding is that a literal type is spec

8条回答
  •  被撕碎了的回忆
    2021-02-07 21:30

    Don't forget there also exists the ASP.Net Literal class.

    EDIT: Thus, an answer to the question in the title is no, as there isn't a "Primitive" class that provides the same functionality. This can be viewed as a bit of a smart alec response, though.

提交回复
热议问题