# GetCardinal Method

## Overloads

| [GetCardinal()](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.Field.GetCardinal.htm#Qlik_Engine_Field_GetCardinal) |  | Retrieves the number of distinct values in a field. |
| --- | --- | --- |

[](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.Field.GetCardinal.htm) [](https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPIref/Content/Qlik.Engine.Field.GetCardinal.htm)

## GetCardinal()

Retrieves the number of distinct values in a field.

### Declaration

```

          public int GetCardinal()
    
  
```

### Returns

| Type | Description |
| --- | --- |
| System.Int32 |  |

### Implements

[IField.GetCardinal()](https://help.qlik.com/en-US/sense-developer/May2025/Subsystems/NetSDKAPIref/Content/Qlik.Engine.IField.GetCardinal.htm#Qlik_Engine_IField_GetCardinal)