c# - using delegate inside a static function -


I have defined a representative area inside a square and I have a constant function (without the object directly). This should not be done, because the class has no purpose and the representative area is not stable. But it works. If someone can please explain this, I have copied some of my code for reference:

  class test {representative blank custom del (string s); Fixed Zero main () {CustomDel del1, del2, del3; // it should not work, but is working}}  

The idea is not to:

  representative of zero custom del (string S);  

This is not a field, it is the definition of a representative type Think about it:

  Private class CustomDel: Representative {// ... }  

The above code will not be compiled because you can delegate declaring such as , but it is essentially what happens under the hood: CustomDel is a type, only a special one.

Now your code needs more sense:

  CustomDel del1, del2, del3;  

This only announces three local variables of type CustomDel .


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -