Cant convert MeshFilter to Mesh

i just want to change my gamobject mesh…

private var TheMesh:MeshFilter;

Selected.GetComponent(MeshFilter).mesh = TheMesh;

how do i do that…i put in a courroutine so u can get an idea…

i found it…more simple

Selected.GetComponent(MeshFilter).mesh = TheMesh.mesh;

or just turn the var TheMesh into Mesh

Selected..GetComponent(MeshFilter).mesh = TheMesh;