how to see a tag of what you hit with raycast

C#
   if (Physics.Raycast (transform.position, fwd, hit, Reach) && hit.transform.tag == "TagName") {
Source

Also in C#: