how to change the position of a gameobject in csharp unity

Code Example - how to change the position of a gameobject in csharp unity

                
                        Vector3 pos = transform.position;
pos.x = 12;
transform.position = pos;