I'm working with a powershell script to try and convert it to a C# program but I have come across a problem I am struggling with. The script uses $NameExample = @(), which I believe is just an empty array in C# - Something like decimal[] NameExample = new decimal[] {}.
Here is more of the code to help but I am mainly trying to figure out how to declare $NameExample = @() as a C# array variable, anything will help! Thanks
$counter = 0
$UnitAvgerage = 20
$NameExample=@()
$NameExample2=@()
while ($counter -lt $NameExample.Count) 
{
    $NameExample2 += $NameExample[$counter..($counter+$UnitAvg -1)] | measure-object -average
    $counter += $NameExample2
}
 
    