> For the complete documentation index, see [llms.txt](https://tim-entertainment.gitbook.io/tim.console/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tim-entertainment.gitbook.io/tim.console/commands/cmdinputresult-c.md).

# CmdInputResult C\#

Contains list of `CmdInputPart`. List is created based on list of Parts from CmdFormula.

You can select necessary part and extract data from it:

Data type depends on PartType.

If this Part has Integer PartType, so you can extract int value from it:

## &#x20;Example:

<figure><img src="/files/B33YXOb4l1Q2t7CBMMYb" alt=""><figcaption></figcaption></figure>

So here is a method that is called when the command is executed:

```
private void OnSpawnBallsCommand(CmdInputResult result)
{
    int ballsCount = result.Parts[1].Integer;
}
```

Lets take a look at all Part Types:

## Sentence

```
public int PartIndex;

void OnCommandExecuted(CmdInputResult result)
{
    string sentence = result.Parts[PartIndex].String;
}
```

## Float, Int, Bool

```
public int PartIndex;

void OnCommandExecuted(CmdInputResult result)
{
    float floatValue = result.Parts[PartIndex].Float; // if float
    
    int intValue = result.Parts[PartIndex].Integer; // if int
    
    bool boolValue = result.Parts[PartIndex].Bool; // if bool
}
```

## Enum

`EnumVariant` returns index of selected variant

`EnumVariantString` returns selected variant

```
public int PartIndex;

void OnCommandExecuted(CmdInputResult result)
{
    int enumVariantIndex = result.Parts[PartIndex].EnumVariant;
    string enumVariantString = result.Parts[PartIndex].EnumVariantString;
}
```
