Can anyone convert this for loop (which is in Java) into c# i

hi,
iam trying to do a unity tutorial but it’s in java and i work with C# script so i tried to convert every code into c# the only thing i have a problem now is

for (var go : GameObject in FindObjectsOfType(GameObject))
   {
    go.SendMessage("OnNetworkLoadedLevel", 
SendMessageOptions.DontRequireReceiver); 
   }

i tried to do this

foreach(GameObject GameobjectsInGame in FindObjectsOfType(GameObject))
				{
					GameobjectsInGame.SendMessage("OnNetWorkLoadedLevel",
					SendMessageOptions.DontRequireReceiver);
				}

but its not working and keep saying GameObject is not a Type type etc, but in the tutorial they used it like that :(, i tried a foreach loop instead of a for loop cause it seem more logical to me that forloops in java works in another way and as there is a “IN” i thougth c# version of that would be a foreach.

original tutorial from unity.
http://download.unity3d.com/support/resources/files/MultiplayerTutorial.pdf

It's because in C#, you need to add "typeof" in front of it:

    foreach (GameObject GameobjectsInGame in FindObjectsOfType(typeof(GameObject)))
    {
          GameobjectsInGame.SendMessage("OnNetWorkLoadedLevel",
          SendMessageOptions.DontRequireReceiver);
    }