how to randomly rotate rigidbody of object in unity

C#
 public float speed; private Rigidbody2D rigidbody2d;  void Start() {     rigidbody2d = GetComponent<Rigidbody2D>();     rigidbody2d.angularVelocity = Random.value * speed; }
Source

Also in C#: