# HG changeset patch # User Markus Bröker # Date 1490781927 -7200 # Node ID 80c685d55d6369206400cd55c091ec77f12e862b # Parent cfa10fbf52b304758b75c852a3c130144573a970 Sinnvolles Beispiel für Function-Pointer in C# diff --git a/.hgignore b/.hgignore old mode 100644 new mode 100755 --- a/.hgignore +++ b/.hgignore @@ -137,3 +137,5 @@ *.bim_*.settings FakesAssemblies/ *.favdoc + +*.userprefs diff --git a/Sales.sln b/Sales.sln old mode 100644 new mode 100755 diff --git a/Sales/App.config b/Sales/App.config old mode 100644 new mode 100755 diff --git a/Sales/Invoice.cs b/Sales/Invoice.cs 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) diff --git a/Sales/Payment.cs b/Sales/Payment.cs 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 }; } } diff --git a/Sales/Program.cs b/Sales/Program.cs 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()); } } } diff --git a/Sales/Properties/AssemblyInfo.cs b/Sales/Properties/AssemblyInfo.cs old mode 100644 new mode 100755 diff --git a/Sales/Sales.csproj b/Sales/Sales.csproj old mode 100644 new mode 100755