.NET Questions
Getting new information about the bunker, I don’t stop running into interesting things :)
And here are some interesting questions for you:
1) When the constructor will not be called when creating an instance of the type?
2) How does the c # compiler interpret the static modifier in front of the class (in IL code)?
3) What modifier of access to fields and methods does not implement c # but implements IL code.
4) Do you know how to declare Union in C # (imitate)? Those. make several fields start at a single offset in memory.
5) Have you ever wondered why for meaningful types (struct) you cannot define a constructor without parameters (in C #)? Is it possible to get around this? :)
6) If we supplied the client with a code where the fields were defined in the type, the client wrote our code on the basis of our code, then we delivered the client a new version of our code where the fields were replaced with properties, what could break in the client’s code?
7) All event handlers should return void ... Does Microsoft follow its requirement in the FCL library? :))
These are answers to questions that you can better understand how the CLR works ...
If you like it, I’ll make the second installment, more difficult :)
Please do not say that the questions are too simple :) I’m sure that there are many people who don’t even they will answer right away :)
ps If the questions are of interest - I will publish the correct answers after some discussion :)
ANSWERS
pps Write at least ...
ANSWERS
And here are some interesting questions for you:
1) When the constructor will not be called when creating an instance of the type?
2) How does the c # compiler interpret the static modifier in front of the class (in IL code)?
3) What modifier of access to fields and methods does not implement c # but implements IL code.
4) Do you know how to declare Union in C # (imitate)? Those. make several fields start at a single offset in memory.
5) Have you ever wondered why for meaningful types (struct) you cannot define a constructor without parameters (in C #)? Is it possible to get around this? :)
6) If we supplied the client with a code where the fields were defined in the type, the client wrote our code on the basis of our code, then we delivered the client a new version of our code where the fields were replaced with properties, what could break in the client’s code?
7) All event handlers should return void ... Does Microsoft follow its requirement in the FCL library? :))
These are answers to questions that you can better understand how the CLR works ...
If you like it, I’ll make the second installment, more difficult :)
Please do not say that the questions are too simple :) I’m sure that there are many people who don’t even they will answer right away :)
ps If the questions are of interest - I will publish the correct answers after some discussion :)
ANSWERS
pps Write at least ...
ANSWERS