Assigning default values to fields trivia

class Tubo { bool value; bool TuboTubo() { return value; } }

Will this piece of code compile (answer without compiling, please Smile)?

3 replies on “Assigning default values to fields trivia”

Questions like this are always difficult to answer without understanding of how language is supposed to behave.

I think, this should raise compiler error for “use of unassigned variable”

Leave a Reply