If you pass an interface or an instance of a class as a parameter, we pass many objects or a full vtable, because as soon as you call the method on the instance, it needs to overwrite vtable and call the corresponding right?How it works?
You pass the link (by value). The exact representation of the link is implementation-specific, but in most cases it will be a pointer :)
. http://yoda.arachsys.com/csharp/parameters.html.
( - - , :)
, vtable. , .
, , IL. http://www.simple-talk.com/community/blogs/simonc/archive/2010/11/01/95464.aspx
, , ( , , ). CLR vtable .
, , !:)
btw, there is no such thing as "passing an interface to a parameter". You always pass a reference to an object that can implement any, one or several interfaces.
Source: https://habr.com/ru/post/1704278/More articles:Как вставить элемент в DIV в положение X Y - javascriptHow can I make my C ++ ActiveX print controls beautifully in Excel? - c ++WCF service issue between Silverlight and Azure Cloud WebRole - silverlightSaving SQL field names and general SQL usage with Delphi - databaseFlex - изменение положения полосы прокрутки в верхней части компонента HorizontalList - flexWhere are LS_COLORS set by default in RHEL 5.x? - terminalWhat is the meaning of man pages, for example. git branch (1) - linuxError loading really big file in PHP? - phpCan you run Crystal Reports 10 in read-only mode to prevent users from creating or modifying a report? - crystal-reports2-finger scrollable div on iPhone? - iphoneAll Articles