title: Loop through a class which contains variables
body: <p>I would like to compare two classes that look like this</p>
  
  <pre><code>public class Order
  {
          public string KundNummer, KundNamn, ErReferens, VarReferens, KontraktsNummer, Betvillk, Levvillk, Levsatt, Speditor,
              Resenh, Projekt, OrderDatum, LeveransDatum, ErtOrdernr, LagerbokfDatum, KundPostAdr, KundPostAdr2, KundGLN, KundPostnr, 
              KundOrt, KundLandKod, KundLand, KundVATnr, KundDistrikt, KundSaljare, KundText1, KundText2, KundText3, KundSprak,
              KundValuta, KundRabattAvtal, KundRabattAvtalBenamning, KundPrislista, KundPrislistaBenamning, KundALnamn, KundALpostAdr, KundALpostAdr2, KundALGLN, KundALpostnr, KundALort,
              KundALlandKod, KundALland;
          public double OrderNummer, Fakturarabatt, Frakt, Expavg, Brutto, Netto, ExklMoms, Totalt, Moms, Avrundn, KundValutaKurs, KundValutaEnhet;
          public int EUPeriodSamman, InklMoms, EjKlar, Levererad, Malukerad, BestallningSkapad, Ordererk,
              Plocklista, Foljesedel, ExtraOrderdokument, Restorder, Faktura, KundSparaText, KundExport, KundRantefakturering, KundKravbrev,
              KundKravavgift, KundRestnoteraEj, KundSamlingsfakturera;
      }
  </code></pre>
  
  <p>i want to compare two objects of this class for logging which fields in my database that changed.</p>
  
  <pre><code>public string OrderUppdateraOrder(Order order)
      {
          Order OrderToCompare = new Order();
          OrderToCompare = OrderVisaOrderInformation(order.OrderNummer);
  
          //then the code goes on to make the changes to the database from the class order
          //while OrdertoComapre still have the values from before this function was called
      }
  </code></pre>
  
  <p>So is it possible to loop through these classes and compare them or do I have to write an <strong>if</strong> for every variable in my class? :)</p>
  
  <p>Or maybe convert it to a List? I don't know? :P</p>
  
  <p>Thank you for answers</p>