multiple estate c#


since churned estate bad (it creates source some-more complicated) c# does yield such settlement directly. nonetheless infrequently useful have ability.



for instance i'm means exercise blank churned estate settlement controlling interfaces 3 classes that:



public interface ifirst { vacant firstmethod(); }
public interface isecond { vacant secondmethod(); }

public category first:ifirst
{
open vacant firstmethod() { console.writeline("first"); }
}

public category second:isecond
{
open vacant secondmethod() { console.writeline("second"); }
}

public category firstandsecond: ifirst, isecond
{
initial first = new first();
second second = new second();
open vacant firstmethod() { first.firstmethod(); }
open vacant secondmethod() { second.secondmethod(); }
}


every i supplement slight interfaces i need change category firstandsecond well.



is there proceed inject churned existent classes new category illusory c++?



maybe there fortitude controlling kind formula generation?



or competence feeling (imaginary c# syntax):



public category firstandsecond: ifirst first, isecond second
{ }


so there won't need transform category firstandsecond i cgange interfaces.






edit



maybe improved cruise receptive example:



you have an existent category (e.g. calm formed tcp fan formed itexttcpclient) already during opposite locations inside your project. feel need emanate member your category easy permitted windows forms developers.



as distant i know now have twin ways this:




  1. write new category hereditary components implements interface texttcpclient category controlling an instance category itself shown firstandsecond.


  2. write new category inherits texttcpclient somehow implements icomponent (haven't indeed attempted yet).




in both cases need work per slight per class. given know need methods texttcpclient member easiest fortitude only brew those twin class.



to prevaricate conflicts competence finished formula date where outcome altered following nonetheless typing palm pristine pain ass.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?