N
Novice
I remember reading some C# documentation at one point that indicated
that you could create a class:
class A
{
public:
int x;
};
such that if you assign a value to the member variable x, another
function will be invoked (aka a proxy function)?
I'm not sure if there is a requirement for class A to extend another
class or how the mechanism works exactly, but basically, it should
allow you to have a function like this:
int returnValue (int parameterInt){
return parameterInt-1;
}
So that when you instatiate an object of type A:
A a;
a.x = 5;
The value of A.x will end up being 4.
Thanks,
Novice
that you could create a class:
class A
{
public:
int x;
};
such that if you assign a value to the member variable x, another
function will be invoked (aka a proxy function)?
I'm not sure if there is a requirement for class A to extend another
class or how the mechanism works exactly, but basically, it should
allow you to have a function like this:
int returnValue (int parameterInt){
return parameterInt-1;
}
So that when you instatiate an object of type A:
A a;
a.x = 5;
The value of A.x will end up being 4.
Thanks,
Novice