Sinnvolles Beispiel für Function-Pointer in C#
authorMarkus Bröker<broeker.markus@googlemail.com>
Wed, 29 Mar 2017 12:05:27 +0200
changeset 1 80c685d55d63
parent 0 cfa10fbf52b3
child 2 0907765a8b2e
Sinnvolles Beispiel für Function-Pointer in C#
.hgignore
Sales.sln
Sales/App.config
Sales/Invoice.cs
Sales/Payment.cs
Sales/Program.cs
Sales/Properties/AssemblyInfo.cs
Sales/Sales.csproj
old mode 100644
new mode 100755
--- a/.hgignore
+++ b/.hgignore
@@ -137,3 +137,5 @@
 *.bim_*.settings
 FakesAssemblies/
 *.favdoc
+
+*.userprefs
old mode 100644
new mode 100755
old mode 100644
new mode 100755
old mode 100644
new mode 100755
--- a/Sales/Invoice.cs
+++ b/Sales/Invoice.cs
@@ -39,7 +39,7 @@
             return value;
         }
 
-        //Rabatt auf den Netto Preis
+        // Rabatt auf den Netto Preis
         private double Rabatt()
         {
             if (value > 1000.0)
old mode 100644
new mode 100755
--- a/Sales/Payment.cs
+++ b/Sales/Payment.cs
@@ -15,6 +15,6 @@
 {
     class Payment
     {
-        public enum PaymentType { NOW, WEEK, MONTH };
+        public enum PaymentType { NOW, WEEK, MONTH, LATER };
     }
 }
old mode 100644
new mode 100755
--- a/Sales/Program.cs
+++ b/Sales/Program.cs
@@ -21,12 +21,8 @@
         {
             Console.OutputEncoding = Encoding.Default;
 
-            Program p = new Program();
-
-            Invoice invoice = new Sales.Invoice(599.99, PaymentType.NOW);
-            Console.WriteLine("Die Endsumme beträgt {0:C}", invoice.getFinalResult());
-
-            Console.ReadKey();
+            Invoice invoice = new Sales.Invoice(599.99, PaymentType.LATER);
+            Console.WriteLine("Die Endsumme beträgt {0:C}", invoice.getFinalResult());		           
         }
     }
 }
old mode 100644
new mode 100755
old mode 100644
new mode 100755