Cast conversion from Mesh to custom Object

Hello to all.
I have a C# class that inheritance from Mesh:

class seat : Mesh


How could cast a mesh to a seat?
Mesh mesh1 = new Mesh(); a valid mesh.

seat mySeat = (seat) mesh1; I got the error: are you missing a cast? and explicit cast exist for this

thanks in advance
kind regards

In your example mesh1 was constructed as a Mesh and not as a seat. Your cast should always fail in this case.

What are you trying to do? It would help us give recommendations if we had a little background.

Thanks a lot Steve,
The Mesh is selected by the user. so is not constructed as a Seat. The plugin receive as a input the mesh. but as Is explained in the post linked above is a bad design for a class.
My error is: I can not assume that all meshes are going to be seats. in other words: I can’t cast an instance of the base type to the derived type.

I will resolve the problem with a method to takes a Mesh as argument and construct a seat from there.

kind regards
thanks in advance.