hey can anyone convert this c code into c#

```
#include<stdio.h>
//Assume following return types while writing the code for this question.
int output1;
void GetBuildingCount(int marineCount,int marinePositions[][2])
{
int x,y,i,j,temp;
for(x=0; x<marineCount; x++)
{
for( y=0; y<marineCount-1; y++)
{
if(marinePositions[y][0]>marinePositions[y+1][0])
{
temp = marinePositions[y+1][0];
marinePositions[y+1][0]=marinePositions[y][0];
marinePositions[y][0] = temp;
}
if(marinePositions[y][0]>marinePositions[y+1][0])
{
temp = marinePositions[y+1][1];
marinePositions[y+1][1]=marinePositions[y][1];
marinePositions[y][1] = temp;
}
}
}
x=0;
y=0;
for(i=0;i<marineCount-1;i++)
{
if(marinePositions[i][0]==marinePositions[i+1][0])
continue;
else
x++;
}
for(i=0;i<marineCount-1;i++)
{
if(marinePositions[i][1]==marinePositions[i+1][1])
continue;
else
y++;
}
output1=(x+y)*8-x*y;
//Write code here
}
```