Mistři v programování na #hovnokod

toto uz sa dlhsim kodom snad ani neda

            ViewBag.FirstTabClass = "active";
            ViewBag.SecondTabClass = "";
            ViewBag.ThirdTabClass = "";
            ViewBag.FourthTabClass = "";
            ViewBag.fifthTabClass = "";
            ViewBag.SixthTabClass = "";

            if (tab != null)
            {
                switch (tab)
                {
                    case 1 :
                        {
                            ViewBag.FirstTabClass = "active";
                            ViewBag.SecondTabClass = "";
                            ViewBag.ThirdTabClass = "";
                            ViewBag.FourthTabClass = "";
                            ViewBag.FifthTabClass = "";
                            ViewBag.SixthTabClass = "";
                        }
                        break;
                    case 2:
                        {
                            ViewBag.FirstTabClass = "";
                            ViewBag.SecondTabClass = "active";
                            ViewBag.ThirdTabClass = "";
                            ViewBag.FourthTabClass = "";
                            ViewBag.FifthTabClass = "";
                            ViewBag.SixthTabClass = "";
                        }
                        break;
                    case 3:
                        {
                            ViewBag.FirstTabClass = "";
                            ViewBag.SecondTabClass = "";
                            ViewBag.ThirdTabClass = "active";
                            ViewBag.FourthTabClass = "";
                            ViewBag.FifthTabClass = "";
                            ViewBag.SixthTabClass = "";
                        }
                        break;
                    case 4:
                        {
                            ViewBag.FirstTabClass = "";
                            ViewBag.SecondTabClass = "";
                            ViewBag.ThirdTabClass = "";
                            ViewBag.FourthTabClass = "active";
                            ViewBag.FifthTabClass = "";
                            ViewBag.SixthTabClass = "";
                        }
                        break;
                    case 5:
                        {
                            ViewBag.FirstTabClass = "";
                            ViewBag.SecondTabClass = "";
                            ViewBag.ThirdTabClass = "";
                            ViewBag.FourthTabClass = "";
                            ViewBag.FifthTabClass = "active";
                            ViewBag.SixthTabClass = "";
                        }
                        break;
                    case 6:
                        {
                            ViewBag.FirstTabClass = "";
                            ViewBag.SecondTabClass = "";
                            ViewBag.ThirdTabClass = "";
                            ViewBag.FourthTabClass = "";
                            ViewBag.FifthTabClass = "";
                            ViewBag.SixthTabClass = "active";
                        }
                        break;
                }
            }

Martin Práznovský,

bazén? bazén. bazén!

bool hasPool = hotelInfo.BoxCheck.Any(i => i.DataName.ToLower().Contains("bazén"));
info.AppendFormat("<span>Bazén: <b>{0}</b></span>", hasPool ? "ANO" : "NE");

Anonymous,


Anonymous,


Anonymous,

som zdedil kod

if (wft.currentState.name == "bla" && wft.currentState.name != "blabla")
     nieco
else
     nieco

Anonymous,