Transform Gameobject?

Hi , simple question how can i use transform.positon on a declared gameobject in c#?

public GameObject test_prefab;
....
Update()
{

test_prefab.transform.position = Vector2.MoveTowards(test_prefab.transform.position,nextpos);

}

I add the prefab to the scene but it wont move.
If i declare it as Transform it works with test_prefab.position = …, but i cant store my prefab this way.

I am not sure for your question.

If you want to create prefabs by using script,
following web is useful