Edit each Parameter Class on Function

Hey, I am trying to make it so that 1 is added to “Row” each time the function “ConvertParamsToClass” is called, but I don’t know how to do that. Can someone help me?

//Variables:

public List<KillFeedInfo> KFI = new List<KillFeedInfo>();

private void ConvertParamsToClass(string Killer, string Gun, string Killed)
	{
	int Row = 0;
	Debug.Log ("Converting Params To Class");
	KillFeedInfo k = new KillFeedInfo(Killer, Gun, Killed, Row);
	KFI.Add(k);
	foreach (KillFeedInfo k in KFI)
		{
		k.Row ++;
		}
	Debug.Log ("Added k");
	}
}

[System.Serializable]
public class KillFeedInfo
{
	public int Row;
	public string Killer;
	public string Gun;
	public string Killed;
	
	public KillFeedInfo(string K, string G, string V, int R)
	{
		Killer = K;
		Gun = G;
		Killed = V;
		Row = R;
	}
}

Create your function inside your class. It should then be able to access the variable and you won’t need to declare it again within the function.

Alternatively, change it from void function and add a return statement. Maybe return 1 and add that each time.