If an enum
type is dedicate only to a specific class, does it make sense to declare it inside the class itself? I mean, would it help to understand that this enum
type was designed to be used only with this class? Another option would be to put them inside the same namespace.
We also need to consider that another Dimension class could need a different enum
type always called toleranceType
.
Thanks.
public class Dimension
{
public enum toleranceType
{
None,
Symmetric,
Deviation
}
public toleranceType ToleranceMode { get; set;}
}
Instead of:
public enum toleranceType
{
None,
Symmetric,
Deviation
}
public class Dimension
{
public toleranceType ToleranceMode { get; set;}
}
enum
types and some of them need exactly the same name?toleranceType
in your example todimensionToleranceType
.Dimension.toleranceType
enum. Please consider that some projects can be really big.