J
Jim Hart
Hi all! Can anyone explain this one to me. . .
I have a 'Util' namespace with a 'Common' class that
contains consts & values I use throughout multiple
projects. One of the members of this 'Common' class is
an enum like so:
public class Common
{
....
public enum thingsAsEnums {CAR, BOAT, HOUSE}
}
I use this enum in a Serializable class / different
project as the type of a field, then create a property to
get/set it...
[Serializable]
public class DoThings
{
....
private Common.thingsAsEnums myThings;
public Common.thingsAsEnums MyThings
{
.... standard get/set here ....
}
}
When I compile, I get the "Type
of '...DoThings.thingsAsEnums' is not not CLS-Compliant."
error. This is for the property declaration (not the
actual field declaration).
If I move the 'thingsAsEnums' enum out of my Util
namespace/Common class and put it into my local
namespace, the error goes away.
Removing the CLSCompliant(true) property fixes the
problem, but I can't do that. Plus, it's cheating - I
want to find out what's going on here.
Does anybody have the *slightest* idea of what is going
on, 'cause for the moment I am absolutely clueless.
TIA!
-- Jim Hart
I have a 'Util' namespace with a 'Common' class that
contains consts & values I use throughout multiple
projects. One of the members of this 'Common' class is
an enum like so:
public class Common
{
....
public enum thingsAsEnums {CAR, BOAT, HOUSE}
}
I use this enum in a Serializable class / different
project as the type of a field, then create a property to
get/set it...
[Serializable]
public class DoThings
{
....
private Common.thingsAsEnums myThings;
public Common.thingsAsEnums MyThings
{
.... standard get/set here ....
}
}
When I compile, I get the "Type
of '...DoThings.thingsAsEnums' is not not CLS-Compliant."
error. This is for the property declaration (not the
actual field declaration).
If I move the 'thingsAsEnums' enum out of my Util
namespace/Common class and put it into my local
namespace, the error goes away.
Removing the CLSCompliant(true) property fixes the
problem, but I can't do that. Plus, it's cheating - I
want to find out what's going on here.
Does anybody have the *slightest* idea of what is going
on, 'cause for the moment I am absolutely clueless.
TIA!
-- Jim Hart