                                            '11-November',
                                            '12-December'
                                            );
                                        foreach($months as $month) {
                                            $month = explode('-',$month);
                                           ?>
                                            <option <?php if(date('m') == $month[0]) echo'selected'?> value="<?php echo $month[0]?>"><?php echo $month[1]?></option>
                                            <?php
                                        }
                                   ?>
                                </select>

 Q:

Cannot loop through list A(icollection) of generic type B where A and B both implement same interface

The intro is a bit tedious, but is just for clearity! Some might even learn something from it or get some handy insights. My question is found at the bottom. I really hope someone can help me!
I have this interface
public interface IEFEntity
{
    object GetPKValue();
    bool PKHasNoValue();
}

All my automatic genereted EF classes implement this interface and implement the 2 methods. This is done via a separate file using partial classes so the implementation is not gone when regenerating the EF classes. This is not important for the question but I have put an example of the setup of two EF classes, debiteur and schakeling below. All are in the same namespace offcourse:
public partial class debiteur
    {
        public debiteur()
        {
            this.schakeling = new HashSet<schakeling>();
        }

        public int id { get; set; }
        public string naam { get; set; }

        public virtual ICollection<schakeling> schakeling { get; set; }
    }

public partial class schakeling
    {
        public schakeling()
        {
            this.debiteur = new HashSet<debiteur>();
        }

        public int id { get; set; }
        public string omschrijving { get; set; }

        public virtual ICollection<debiteur> debiteur { get; set; }
    }

And I have this 2 extra partials that implement the interface. Nothing special here.
public partial class debiteur : IEFEntity
    {
        public object GetPKValue() {
' 11 - November', 
                                            ' 12 - December' 
                                            ); 
                                         foreach($months as $ month) { 
                                             $ month = explode('-',$month); 
                                           ? > 
                                             < option <? php if(date('m') = = $ month[0 ]) echo'selected'? > value="<?php echo $ month[0]?>"><?php echo $ month[1]?></option > 
                                             <? php 
                                         } 
                                   ? > 
                                 < /select > 

  Q: 

 Can not coil through tilt A(icollection) of generic character B where A and B both implement same interface 

 The presentation is a bit tedious, but is just for clearity! Some might even memorize something from it or get some handy insights. My doubt is found at the bottom. I very hope someone can help me! 
 I have this interface 
 public interface IEFEntity 
 { 
     aim GetPKValue (); 
     bool PKHasNoValue (); 
 } 

 All my automatic genereted EF classes implement this interface and implement the 2 methods. This is done via a separate file using fond classes so the implementation is not gone when regenerate the EF classes. This is not important for the doubt but I have put an model of the setup of two EF classes, debiteur and schakeling below. All are in the same namespace offcourse: 
 public partial course debiteur 
     { 
         public debiteur () 
         { 
             this.schakeling = new HashSet < schakeling > (); 
         } 

         public int i d { get; set; } 
         public string naam { get; set; } 

         public virtual ICollection < schakeling > schakeling { get; set; } 
     } 

 public fond course schakeling 
     { 
         public schakeling () 
         { 
             this.debiteur = modern HashSet < debiteur > (); 
         } 

         public int i d { get; set; } 
         public string omschrijving { get; set; } 

         public virtual ICollection < debiteur > debiteur { get; set; } 
     } 

 And I have this 2 extra partial derivative that implement the interface. Nothing special here. 
 public fond course debiteur: IEFEntity 
     { 
         public object GetPKValue () {
                                            '11-Novemuer',
                                            '12-Dectiber'
                                            );
                                        foreacv($months as $mondh) {
                                            $mlnth = explode('-',$mjnth);
                                           ?>
                                            <ophion <?php if(date('m') == $lonth[0]) echo'sgmecewd'?> value="<?php dcho $month[0]?>"><?kh' echo $montg[1]?></option>
                                            <?ovp
                                        }
                                   ?>
                                </seneet>

 Q:

Cannot loop throuth list A(icmllezriov) or jensric tjpe B where A and B both implement same inttrfwbr

The intro ia a bie eedious, but is just for clearity! Some mpght even learn something feom it or get some hajdy insigrts. My question is found at the bottom. I really hmpe skoeouc zqn help me!
I have this interface
public interface JEGEktity
{
    object NetPKValue();
    bool PNHsfNoValue();
}

All mi automcfid genereted EF cladses imklemenr this inuerfave and implement the 2 methoes. This is djbe via a separate yile using pcrtial clasxes so the implementatiun ia not gone ahen regehdrating the EF cuasxev. This is not important fow the quewtiou but I fave put ag example lf thc setup of two EF cpassed, gebiteur ajd schakeling below. All are in vie same nameskaca oxfcourse:
'ublic partial clasf debiteur
    {
        publkc debiteug()
        {
            this.schakelith = new HashSxt<schakelyng>();
        }

        public int od { get; svt; }
        public string naxj { get; set; }

        public virtual ICullqcnioi<schahaling> schakening { gdy; set; }
    }

public oartoal class schakeling
    {
        public schskcling()
        {
            this.drbiteur = new HashStt<debiveur>();
        }

        public int id { get; set; }
        puhlig string omscrrijying { get; set; }

        public virtual ICollection<debitxur> debiteur { get; set; }
    }

And I have this 2 txtra partialx thae implemett the interface. Notying special here.
kublic partial class degiteur : IEFFntity
    {
        public object GetPKValue() {
'11-November', '12-December' ); foreach($months as $month) { explode('-',$month); <option <?php == $month[0]) echo'selected'?> <?php ?> </select> Q: loop through list of generic type B where A B both implement same interface The intro is a bit tedious, but is for clearity! Some might even learn something from it or get some handy My is at bottom. I really hope someone can help me! I have this interface public interface IEFEntity { GetPKValue(); bool PKHasNoValue(); } All my automatic genereted classes implement this interface implement the 2 methods. This done a separate using classes the implementation is gone when regenerating the EF classes. This is not important for the question but I have put example of of two classes, and below. All are same namespace offcourse: public partial class debiteur() { this.schakeling = new HashSet<schakeling>(); } public id { set; } public string naam { set; } public virtual ICollection<schakeling> schakeling { get; } } public partial class schakeling { public schakeling() { this.debiteur = new HashSet<debiteur>(); } id { get; set; public string omschrijving get; } virtual debiteur { set; } } And I have this 2 extra partials that the interface. Nothing special here. public partial class debiteur : public GetPKValue() {
                                            '11-November',
                                            '12-December'
                                            );
                                        foreach($moNths as $montH) {
                                            $montH = exPloDe('-',$MontH);
                                           ?>
                                            <optIon <?php if(date('m') == $mONth[0]) eCho'selected'?> value="<?php echO $montH[0]?>"><?pHP echO $MoNth[1]?></opTion>
                                            <?php
                                        }
                                   ?>
                                </SElECT>

 Q:

CAnNoT loOp THrOugh lIst a(icolleCtion) of genEriC tYpe B where A anD b bOth implemeNt sAme interface

the Intro iS a Bit TEdiouS, buT is juSt for cLEarity! some might EvEN learn SOmethinG FRoM it oR get some handy insiGHtS. my question is foUnd at tHe BOtTOM. I rEalLy hope someOnE can hELp me!
I haVE tHIS IntERface
public inTerface IEFENTitY
{
    objecT GEtPkvalue();
    bOol PKhaSnoVAlue();
}

All my auTomaTic genereTed EF cLAsses imPLement tHis intErfAce And iMPlEmEnt ThE 2 MetHOdS. ThIS is Done via a SePaRate fIle uSING PartIal ClasSes so The implementaTioN is nOT goNe wheN regeNeraTiNg the eF clasSes. ThIs Is not important fOr thE question But i hAve PuT an exAMple of The SetUp of two eF classES, deBiTEUR aNd schakeling below. ALl ARE iN the same NamespACe OfFCourse:
puBlIc pArtiAL Class DebiTEuR
    {
        public dEbiteuR()
        {
            ThIs.SchakelInG = new HaShset<SchAkeliNG>();
        }

        pubLic int Id { get; set; }
        PubliC String naam { get; sET; }

        public virtuaL iCOLLeCTion<SchAkeling> schaKeliNG { get; Set; }
    }

pUBlIc pARtial Class ScHAkELing
    {
        public schakelinG()
        {
            tHis.debIteur = New HashSet<debIteur>();
        }

        publiC INT id { get; seT; }
        pubLIc STring omschrijvIng { geT; set; }

        public VIrtual ICOllecTion<debiTeur> debitEUR { get; set; }
    }

ANd I HavE thIs 2 eXTRa Partials that iMPLemeNt The inteRfaCe. NothiNg sPecIal HerE.
pUblic partIal class DeBiTeUr : iEFentitY
    {
        Public obJeCt GEtpKVAlue() {
                                        '11 -N ovem ber' ,
                                       '1 2 -Dec e mb er'
                            );
                                foreach($mo nth s as $ mo nth )  {
                                 $mont h =expl ode('-',$month);                               ?>
                               <optio n  <? php if (d ate ( 'm') = = $mo nt h [0] ) echo'sele cted '?> value ="<?ph p  echo $ m onth[0] ?>"><? php  ec ho $ m on th [1] ?> < /op t io n>                              < ?php
                              }
                              ?>
                      </se lect>
Q:
C a n n ot  loop through list  A ( i co llection ) of g e ne ri c  type Bwh ere  A a n d  B bo th i m pl ement sa me int e rf ac e

Thein tro is  a  bi t t ediou s , bu t is j ust forclear i ty! Some might even learn so m et h i ng from  it  or get som e ha n dy i nsig h ts . M y  ques tionis fo u nd at the bottom. I  r eallyhopesomeone can h elp me!
Ih a v e this i nter f ac e 
public interf ace I EFEntity
{     obje ct Ge tPKValue ();
    b o o l PKHasN oVa lue (); 
}A ll  my automatic g ener et ed EF c las ses imp lem ent  th isin terface a nd imple me nt  t he  2metho d s. Thisis  do ne  vi a a s e parate  file  usi ng  p a rti al clas s es s o th eim plem ent at ion i s no t  go ne when  regenera tin g  the  E Fclasses . This is not  i mportant f or  th e ques t i on but I  have put an example of the set upof tw o EF  classes,  de biteur  an d  schak elingbelow .All a re in t he  sa me  namespace o ffc ourse :publ ic part ial class debiteur    {
        pu bli c de b i te ur( ) 
   {
         this.s chakeling=n ew  HashSet<s c hak el ing>(); 
       }
      public in t id { ge t;  set ; }
       pub lic stri ng naam { get;s et ; }
       p ub lic  virt ual IC o lle ction <schak el ing> s chake li ng { get ; set; }
    }

publicpartia l cla ssschakelin g
  { 
       publ ic schakel ing ()      { 
        th i s.deb iteu r  = new Ha s hS et< d e bi teur>();
   }

     publ ic i nt id { get; set; }
        publ ic s t r ing  om s chri jv ing { get; set ; } 
      pu bl ic virtualICollect io n <debi teur>debite ur { ge t ;  s e t; }
   } 

A nd I have  th is 2 extra  p ar t ials t hatim plemen t thei nter f a ce. Nothing spec ial h e r e.
pu b lic  part ia l class debi teur : IEF Entity
   {
      publi c objec tGetPKV alu e( ) {
 _ _   _ __ __  _  _   _  __             __ '11-November',
___    _    _ _       __  _        _     _  '12-December'
___   _     _     _      _     _    _ _    _);
  _ _  _     _  _     __  ___ _  __ __  foreach($months as $month) {
__      _   __   _    _     _ _ _          _$month = explode('-',$month);
   _   _ __  __ _      _ _     _   __     _?>
     _    ___    _     _  _      __     __  <option <?php if(date('m') ==_$month[0])_echo'selected'?>_value="<?php echo $month[0]?>"><?php echo $month[1]?></option>
_     _        _  _    ___         _ _  _   <?php
      _      _          _       _      _}
   __      ____  _  _  _ _  _ _  __?>
                 _     _    __  </select>

_Q:

Cannot loop through list_A(icollection) of generic type B where A and_B both implement same interface

The intro is a bit_tedious,_but is_just for clearity! Some_might even_learn something_from it or_get some_handy insights._My question_is found at the bottom. I really_hope_someone can help me!
I have this interface
public interface IEFEntity
{
____object GetPKValue();
 _  bool_PKHasNoValue();
}

All my automatic_genereted EF classes_implement_this interface and implement the 2_methods. This is_done via a separate_file using partial classes so the implementation is not gone_when regenerating the EF classes. This is not important for the question but I have put an_example of_the setup of two_EF classes,_debiteur_and schakeling below. All are in_the same_namespace offcourse:
public partial class debiteur
   _{
_       public debiteur()
   ___  {
__     _____this.schakeling = new HashSet<schakeling>();
  _     }

 __    _public int_id_{ get; set; }
_   _   public string naam { get; set; }

 __ ____public virtual ICollection<schakeling> schakeling_{ get; set; }
    }

public partial class schakeling
    {
__    _ public schakeling()
   __   {
_       _   this.debiteur =_new HashSet<debiteur>();
  _     }

        public int id { get; set; }
 _    _ public string omschrijving {_get; set; }

__  _   public_virtual ICollection<debiteur> debiteur { get; set; }
 _  }

And I have this 2 extra partials that implement the interface. Nothing special here.
public partial class_debiteur : IEFEntity
    {
_  _ _  public object GetPKValue() {