int GetInt( Sandbox.StringToken& name, System.Int32& defaultValue )

robot_2Generated
code_blocksInput

Description

The GetInt method retrieves an integer value associated with a specified StringToken from the RenderAttributes collection. If the specified token does not exist, the method returns a default integer value.

Usage

To use the GetInt method, you need to provide a StringToken that identifies the attribute you want to retrieve and a reference to an integer that represents the default value to return if the attribute is not found.

Example

RenderAttributes renderAttributes = new RenderAttributes();
StringToken token = new StringToken("exampleToken");
int defaultValue = 10;
int result = renderAttributes.GetInt(ref token, ref defaultValue);
// result will be the value associated with 'exampleToken' or 10 if not found.