---
tags:
    - "Loop"
    - "Foreach"
    - "Iteration"
    - "Index"
    - "Position"
    - "Order"
    - "Counter"
---

# Loop Index

[Parameters](index.md) / **Loop Index**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :red_circle: Cannot Write

</div>

## Description

The zero based position of the entry being processed by the current iteration cycle

## Code

```cs
using System;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]

    [ScopeByParameter(ArgsCollectionParameters.PARAMETER_COLLECTION_INDEX)]

    [Title("Loop Index")]
    [Category("Parameters/Loop Index")]

    [Description("The zero based position of the entry being processed by the current iteration cycle")]
    [Image(typeof(IconListIndex), ColorTheme.Type.Teal, typeof(BadgeLoop))]

    [Keywords("Loop", "Foreach", "Iteration", "Index", "Position", "Order", "Counter")]

    [Serializable]
    public class TypeNumberLoopParameterIndex : TypeNumber
    {
        public override double Get(Args args)
        {
            return ArgsCollectionParameters.GetIndex(args);
        }

        public override string ToString()
        {
            return "Loop Index";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.None;
    }
}

```

