int GetComboInt( Sandbox.StringToken& k, System.Int32& defaultValue )

book_4_sparkGenerated
code_blocksInput

Description

The GetComboInt method retrieves an integer value associated with a specified key from the render attributes. If the key does not exist, it returns a default value.

Usage

To use the GetComboInt method, you need to provide a StringToken that represents the key and an integer that serves as the default value. The method will return the integer value associated with the key if it exists; otherwise, it will return the default value.

Example

RenderAttributes renderAttributes = new RenderAttributes();
StringToken key = new StringToken("exampleKey");
int defaultValue = 10;
int result = renderAttributes.GetComboInt(ref key, ref defaultValue);
// result will be the value associated with 'exampleKey' or 10 if the key does not exist.