Domanda

I always prefer to use existing (.Net source originated) structures and enums, over self creating them. I want to have a structure to define a 3d size. For 2D, SizeF does the job. What about width, heigth and depth?

È stato utile?

Soluzione

You haven't told us what kind of app you're writing, but if you're using WPF then Size3D might be what you want:

Data structure that describes the size of a three-dimensional object.

Admittedly it (oddly) has X, Y and Z properties rather than Width, Height and Depth - but at least the name has the right implication.

(There's also Vector3D and Point3D where you need those.)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top