CodeVariable2::ConstKind Property
Sets or gets when the variable is eligible to be changed.
Assembly: EnvDTE80 (in EnvDTE80.dll)
Values are defined by the vsCmConstKind enumeration.
The ConstKind property is used to determine whether a property has been designated as a constant or read-only variable. It can be used in conjunction with the IsConstant property, but it can also be used independently.
Setting the ConstKind property has a direct effect on the current CodeElement. (It is not required to also change the IsConstant property.) Therefore, ConstKind can be used to create a new const or read-only variable or to convert an existing variable from any of the three states to any other. The IsConstant property will be updated to match.)
Note |
|---|
The values of code model elements such as classes, structs, functions, attributes, delegates, and so forth can be non-deterministic after making certain kinds of edits, meaning that their values cannot be relied upon to always remain the same. |
