CodeVariable2::ConstKind Property

 

Sets or gets when the variable is eligible to be changed.

Namespace:   EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

property vsCMConstKind ConstKind {
	vsCMConstKind get();
	void set(vsCMConstKind value);
}

Property Value

Type: EnvDTE80::vsCMConstKind

A vsCMConstKind enumeration.

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.)

System_CAPS_noteNote

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.

Return to top
Show: