Position:Home>net development> The head file of analytic C /CLI, inside couplet function and array
The head file of analytic C /CLI, inside couplet function and array
From;  Author:Stand originally


So, if want to use Point in the code of other program volume, how be met again? All is opposite of Point member function call be because is the couplet inside this changed,met? Theoretic for, yes, after all, to compile applied process code, compile implement volume of program of need visit Point, reason how does its very clear and established this member function come true, the adduction that also can allow these pair of function from this undertakes optimizing.

Will see GetHashCode, from it simple content looks, suit to undertake very much it seems that inside couplet is changed. Assume now from exterior another program concentration is all to it calling is inside couplet changes, so, next, compile implement probable meeting uses different algorithm to realize this function afresh. But if did not make this exterior order part afresh, it will continue to use inside the Hashcode of couplet is algorithmic, is not new version. Because this is not the behavior of an expectation happening normally, should avoid to cross program volume border as far as possible so inside couplet, so, also won't be opposite those not important Get and Set method have X and Y property inside couplet.

What can I hope is, optimize still can compiling besides undertake, e.g. , in the simplest executive mode, every time a program should move only, its CIL instruction can be carried out. However, one is compiled immediately implement (JIT) can identify a specific encode Fan Shi, undertake all sorts of optimizing, included the couplet inside code among them. And those large, complex programs, when can be being installed every time, compile for this locality code, with this kind of method, need not be in every time when the program is carried out, undertake was optimizinged.

The definition of GetHashCode is to do not have statement to be inside of couplet, if stated, that is right of this file many include, meet those who bring about same title be defined for many times, do not count on a link implement won't put forward " to protest " . But want to know, this kind of method is to use is not head file at program volume, won't produce this kind of mistake commonly so, in the program concentration has the only definition of this function only. Say commonly, inline is used in context, stem from freewill and not be to force, in fact, in this exemple, cannot use, because statement is any function of Override, cannot again the Inline on mark.

Comply with CLS

If the Set in attribute and Get method used extraordinary can visit a gender, so, with respect to the ability that can work in coordination between block up language. Of CLI among them a target is namely below the circumstance of beardless and active request, the each other between promotion language operates a gender, for this, it defined standard of an universal language (CLS [1] ) with regulation of a CLS, for example, the 25th regulation mentions expressly: "The visit sex of attribute accesses a program to should be consistent. "The visit sex of attribute accesses a program to should be consistent..
Previous 1 23 Next