I’ll start with a poll: how do you know how to execute the code before the start of the Main () function (I hope that I will list all the unknown people and a couple of unknowns :))?
And now the problem:
Before you is a small code that displays two characters (by the way, check yourself: in what order will they appear?). It is necessary to display the underscore "_" between these characters. Of course, the task would be trivial without restrictions. And they are as follows:
do not define another method Main
do not use the Console identifier as a class name, property, field, etc. (thanks to the irc-user Gopneg)
do not change the code of all existing methods: App.Main, XX, YY
do not change the definition of the Xy field
do not add new fields to class X
using System;<br><br> class Y<br>{<br> public Y()<br> {<br> Console .Write( "0" );<br> }<br>}<br><br> class X<br>{<br> public X()<br> {<br> Console .Write( "o" );<br> }<br> Y y = new Y();<br>}<br><br> class App<br>{<br> static void Main()<br> {<br> X x = new X();<br> }<br>}<br> <br> * This source code was highlighted with Source Code Highlighter .