Exemple #1
0
 public static void ArgumentNotNull(object s, string argName)
 {
     if (s == null)
     {
         throw Excp.ArgNull(argName);
     }
 }
Exemple #2
0
 public static void With(bool condition, string msgFrmt, params object[] args)
 {
     if (!condition)
     {
         throw Excp.CommonException(msgFrmt.FormIt(args));
     }
 }
Exemple #3
0
 public static void IsNotNull(object s, string message)
 {
     if (s == null)
     {
         throw Excp.CommonException(message);
     }
 }
Exemple #4
0
 public static void NotNullOrEmpty(string arg, string argName)
 {
     if (string.IsNullOrEmpty(arg))
     {
         throw Excp.ArgNullOrEmpty(argName);
     }
 }
        public decimal FiyatHesapla()
        {
            try
            {
                FileStream fs = new FileStream(@"room_cost.txt", FileMode.Append);
                fs.Close();
                StreamReader sr = new StreamReader(@"room_cost.txt");


                kira = Convert.ToInt32(Convert.ToInt32(sr.ReadLine()) * OdaSayisi);
                if (kira == 0)
                {
                    kira = OdaSayisi * 200;
                }

                sr.Close();
                return(kira);
            }
            catch (Exception Excp)
            {
                throw new Exception(Excp.ToString());
            }
        }