J
Jamie Risk
I'm using a class in my project and I'd like to determine if the
any of the fields in the object have been modified since the
original instantiation. For intent and purposes, the following
class is typical:
public class patient
{
private string name;
private string surname;
public Name {
get { return this.name; }
set { this.name = value; }
}
public Surname {
get { return this.surname; }
set { this.surname = value; }
}
}
The example is only meant to show that the class in question
isn't inheriting from another class.
Whether the modification check happens synchronously (through a
method or property access) or asynchronously (such as an event)
isn't all that important. All that I'm trying to avoid is
re-doing the original class or inheriting from the original
class and overriding all the accessor methods.
Suggestions?
any of the fields in the object have been modified since the
original instantiation. For intent and purposes, the following
class is typical:
public class patient
{
private string name;
private string surname;
public Name {
get { return this.name; }
set { this.name = value; }
}
public Surname {
get { return this.surname; }
set { this.surname = value; }
}
}
The example is only meant to show that the class in question
isn't inheriting from another class.
Whether the modification check happens synchronously (through a
method or property access) or asynchronously (such as an event)
isn't all that important. All that I'm trying to avoid is
re-doing the original class or inheriting from the original
class and overriding all the accessor methods.
Suggestions?