Programmed Canon Canola calculators in 1977. Assorted platforms and languages ever since. Assisting with HOPL.info.
I am NOT looking for work -- I've got more than enough to do.
Location
Perth, WA Australia
Education
A few diplomas.
Work
Software Engineer at [Daisy Digital](https://daisydigital.com.au/)
The first WriteLine gives "Hello, Class" but the second one throw an error, namely {"Object reference not set to an instance of an object."} when evaluating var _returning = _value; so one must have atry{}finally{} in the property declaration.
LATER
In fact, even
try{return_value;}finally{_value=null;}
doesn't cut it in the Klasse version.
LATER AGAIN
Actually, it does cut it. So perhaps the first one is okay too. The problem is in the second Console.WriteLine(r1vc.Value.klasse); because the second r1vc.Value returns null. So getting klasse of null is an error. Soooooo ... I need to do something like
Thanks to everyone who contributed.
As I was fiddling with this, I thought, "hey why not just"
Well, that's fine until you do this
after having defined the class
Klasse
asThe first WriteLine gives "Hello, Class" but the second one throw an error, namely
{"Object reference not set to an instance of an object."}
when evaluatingvar _returning = _value;
so one must have atry{}finally{}
in the property declaration.LATER
In fact, even
doesn't cut it in the
Klasse
version.LATER AGAIN
Actually, it does cut it. So perhaps the first one is okay too. The problem is in the second
Console.WriteLine(r1vc.Value.klasse);
because the secondr1vc.Value
returns null. So gettingklasse
of null is an error. Soooooo ... I need to do something likeImplemented this program in java.. That's why i didn't faced those issues except the return value null conversion error.
Glad you solved it. Cheers 🥂