Turn off castShadow in Unity5

Hi everyone.
Im trying to turn off castShadow in some gameObject. But i dont know how can i do it. In Unity4 works like this:

public class TurnOnLights : MonoBehaviour {

    public GameObject[] objs;

	void Start () {
        for (int i = 0; i < objs.Length; i++)
        {
            objs*.GetComponent<MeshRenderer>().castShadow = false;*

objs*.GetComponent().castShadow = false;*
}

* }*
}

i found answer:

transform.GetComponent<Renderer>().shadowCastingMode = ShadowCastingMode.Off;