static Portal_() { _countries[0] = new England(); _countries[1] = new France(); _countries[2] = new Germany(); _countries[3] = new Spain(); _countries[4] = new Ukraine(); }
public void TestDeductionsGermany() { var germany = new Germany(); Assert.AreEqual("Germany", germany.Name); Assert.AreEqual(2, germany.Deductions.Count()); var incomeTax = germany.Deductions.SingleOrDefault(d => d.Description == "Income Tax"); Assert.IsNotNull(incomeTax); Assert.AreEqual(100, incomeTax.Calculate(400)); Assert.AreEqual(196, incomeTax.Calculate(700)); var pension = germany.Deductions.SingleOrDefault(d => d.Description == "Pension"); Assert.IsNotNull(pension); Assert.AreEqual(8, pension.Calculate(400)); Assert.AreEqual(14, pension.Calculate(700)); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Germany obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
static void Main(string[] args) { Console.Write("Как Вас зовут: "); string name = Console.ReadLine(); Console.Write("Сколько у Вас средств: "); int balance = Int32.Parse(Console.ReadLine()); Console.Write("Сколько Вы уже потратили в нашем магазине: "); int spent = Int32.Parse(Console.ReadLine()); Console.WindowWidth = 63; User user = new User(name, balance, spent); Console.ForegroundColor = ConsoleColor.DarkBlue; Console.WriteLine("Список курсов: "); Console.ResetColor(); English eng = new English( "В Ландон за 15 минут в день", "Королева Елизавета", "Английский", 490, "Пирожок с подливой" ); eng.InfoCourse(eng); Germany ger = new Germany( "На Берлин", "Рудольф Иванов", "Немецкий", 666 ); ger.InfoCourse(ger); Italy itl = new Italy( "Хочу Пасту Болоньезе", "Равиолли Веспучи", "Итальянский", 575 ); itl.InfoCourse(itl); China china = new China( "Последователь Мулан", "Хаоями Мияноки", "Китайский", 1000 ); china.InfoCourse(china); Course[] courses = new Course[] { eng, ger, itl, china }; Informer informer = new Informer(); while (true) { Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine("\nДобро пожаловать в мир почти бесплатных знаний!\n"); Console.ResetColor(); for (int i = 0; i < courses.Length; i++) { Console.WriteLine($"Курс {i} - \"{courses[i].CourseName}\" по цене {courses[i].Price}"); } Console.Write("\nВыбериет номер интересующего направления и нажмите Enter: "); int productNumber = Int32.Parse(Console.ReadLine()); if (productNumber >= 0 && productNumber < courses.Length) { if (courses[productNumber].Price <= user.Balance) { informer.Buy(user, courses[productNumber]); Bye(); } else { Console.WriteLine("У Вас недостаточно средств"); } } else { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Таких курсов у нас нет"); Console.ResetColor(); } }
public Germany(Germany.Market m) : this(NQuantLibcPINVOKE.new_Germany__SWIG_0((int)m), true) { if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve(); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Germany obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; }