{"id":4412,"date":"2014-03-30T10:44:01","date_gmt":"2014-03-30T10:44:01","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/is-it-possible-to-remove-dll-dependency-due-to-interface-collection-of-common-programming-errors\/"},"modified":"2014-03-30T10:44:01","modified_gmt":"2014-03-30T10:44:01","slug":"is-it-possible-to-remove-dll-dependency-due-to-interface-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/is-it-possible-to-remove-dll-dependency-due-to-interface-collection-of-common-programming-errors\/","title":{"rendered":"Is it possible to remove DLL dependency due to interface?-Collection of common programming errors"},"content":{"rendered":"<p>Let&#8217;s say my library class (in assembly A) have a method <code>GetFoo()<\/code> returns a type <code>Foo<\/code>. <code>Foo<\/code> implements several interfaces, including <code>IBar<\/code> in assembly B. When a client code calls <code>GetFoo()<\/code> (the client code does not reference assembly B), the compiler will gives an error, because <code>IBar<\/code> &#8220;is defined in an assembly that is not referenced. You must add a reference to assembly B&#8221;. Note that my code only needs to know about Foo, and it contains no reference to the interface.<\/p>\n<p>Is it possible to not have to reference B? As far as I know there is no need for the runtime to know about it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s say my library class (in assembly A) have a method GetFoo() returns a type Foo. Foo implements several interfaces, including IBar in assembly B. When a client code calls GetFoo() (the client code does not reference assembly B), the compiler will gives an error, because IBar &#8220;is defined in an assembly that is not [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4412","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4412"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4412\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}