What is the difference between <Literal> and <Object> in a Visual Studio fragment?

I read the documentation on <Literal> and <Object> , and I understand that Literal is for values ​​defined by a fragment, and Object is for values ​​defined outside of a fragment.

I also see that Object has an additional Type element that contains the type of variable that the declaration expects. I do not know how this element affects the resulting code.

What is the functional difference between Literal and Object declarations from the perspective of the person using the fragment?

+7
visual-studio code-snippets
source share
1 answer

Functionally, it is similar to the Literal type, but has an additional type restriction.

+2
source share

All Articles