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

book_4_sparkGenerated
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 usage:

RenderAttributes attributes = new RenderAttributes();
StringToken token = new StringToken("exampleToken");
int defaultValue = 10;
int result = attributes.GetInt(ref token, ref defaultValue);

In this example, result will contain the integer value associated with exampleToken if it exists, or 10 if it does not.

Example

RenderAttributes attributes = new RenderAttributes();
StringToken token = new StringToken("exampleToken");
int defaultValue = 10;
int result = attributes.GetInt(ref token, ref defaultValue);