The code does not run as the compiler error is pretty clear and preventing the code from compiling.
Here is the official documentation on the
Compiler Error CS0053 (C#)[
^]
Quote:
A public construct must return a publicly accessible object. For more information, see Access Modifiers (C# Programming Guide)[^].
So, "property type 'Trainee' is less accessible than property 'frm3Update.TraineeUpdate'" is say that this is your problem:
private Trainee mUpdateTrainee;
public Trainee TraineeUpdate
{
get { return mUpdateTrainee; }
set { mUpdateTrainee = value; }
}
The
Traniee
class (not provided) is not marked with a
public
accessor.