Exposing properties in a nexted class?

  • Thread starter Thread starter Bruce
  • Start date Start date
B

Bruce

I have a nested class and I would like to expose the properties of the
nested class. How do I do this?



In the following class, I can see all of the properties of
FitnessUserProfile in VB. I can see the Activity class within the
FitnessUserProfile object but I can't see any
FitnessUserProfile.Activity properties. Why?

I am using Visual Studio 2005.




namespace GarXface
{


public ref class FitnessUserProfile : public ICloneable
{

public:

property unsigned BirthDay
{
void set(unsigned day)
{
m_pProfile->SetBirthDay(day);
}

unsigned get()
{
return m_pProfile->GetBirthDay();
}
}


ref class Activity : public ICloneable {
internal:

Activity(void);

public:

property float MaxHeartRate
{
void set(float heartRate)
{

}

float get()
{

}

}
 
I have a nested class and I would like to expose the properties of the
nested class.  How do I do this?

In the following class, I can see all of the properties of
FitnessUserProfile in VB.  I can see the Activity class within the
FitnessUserProfile object but I can't see any
FitnessUserProfile.Activity properties.   Why?

Because you don't have a property named FitnessUserProfile.Activity of
the corresponding type - or, at least, I do not see it in your code
sample. Nested classes are nested _classes_, and not necessarily
nested _objects_.
 
Back
Top