newbie at C# needs help with for loop

Okay I started today with C# in Unity and was wondering if someone can hep me with this for loop:

        foreach(MeshRenderer mr in gameObject.GetComponentInChildren<MeshRenderer>()){
            mr.enabled=real;
        }
        foreach(MeshCollider col in gameObject.GetComponentInChildren<MeshRenderer>()){
            col.isTrigger= !real;
        }

All the error codes monodevelope gives me instantlly make my brain freeze over.

Even if you can just give me a goor refrence to work with.

The bottom one needs to use

gameObject.GetComponentInChildren<MeshCollider>()

instead of the same, but with MeshRenderer

The rest looks ok, though you don't need to use gameObject each time - GetComponentInChildren by itself will work fine

Also to get a IEnumerat use GetComponents not GetComponent :P