Consider this home-made const:
struct Task {
char[] ID;
}
private Task _CurrentTask; //mutable
public Task CurrentTask() { return _CurrentTask; } //const
public void StopTask() {
CurrentTask.ID = null;
}
Notice the bug? That last line should read "_CurrentTask.ID = null;"
Isn't there something the compiler can do to help me catch these bugs?
L.