<address id="xpjh9"><listing id="xpjh9"><meter id="xpjh9"></meter></listing></address>

<address id="xpjh9"><address id="xpjh9"><listing id="xpjh9"></listing></address></address>
<noframes id="xpjh9">
<noframes id="xpjh9">

<address id="xpjh9"><address id="xpjh9"><listing id="xpjh9"></listing></address></address>
    <form id="xpjh9"></form><address id="xpjh9"><listing id="xpjh9"><menuitem id="xpjh9"></menuitem></listing></address>

      <noframes id="xpjh9">
      VB.net 2010 視頻教程 VB.net 2010 視頻教程 VB.net 2010 視頻教程
      SQL Server 2008 視頻教程 c#入門經典教程 Visual Basic從門到精通視頻教程
      當前位置:
      首頁 > 編程開發 > .net教程 >
      • ASP.net教程之C# 分支語句

      • 2019-06-12 17:06 來源:未知

      分支語句:

      1.if語句:適合判斷一些連續的值,可配合else語句或else if語句使用

      使用語法:  if (條件1) {代碼1}   else if(條件2) {代碼2} else {代碼N}  

      復制代碼
       1 Console.Write("請輸入一個整數:");
       2 int a = int.Parse(Console.ReadLine());
       3 if (a < 10)
       4 {
       5       Console.WriteLine(a + "小于10");
       6 }
       7 
       8  if (a == 10)
       9 {
      10     Console.WriteLine(a + "等于10");
      11 }
      12 else
      13 {
      14      Console.WriteLine(a + "大于10");
      15 }
      復制代碼

      2.switch語句:適合判斷一些具有離散de值

      語法格式:

      switch (表達式)
      {
      case 目標值1:
      執行語句1;
      break;
      case 目標值2:
      執行語句2;
      break;
      ......

      case 目標值n:
      執行語句n;
      break;
      default:
      執行語句n + 1;
      break;
      }

      基本規則:

      <1>表達式的類型可以是: bool,整形,char,string,枚舉,或相應可以為null的類型.

      <2>case標簽的目標值只能是唯一的值

      <3>對于多個case標簽的輸入如果都是一樣的則可以簡寫:

        如:case  1:

          case 2:

            執行語句

      <4>兩個case之間如果有代碼,如果沒有break跳出,則會提示;控制不能從一個case標簽貫穿到另一個case標簽.(除了break,也可以用return、throw等來代替)

      簡單示例:

      復制代碼
       1 switch (a)
       2 {
       3     case 1:
       4     case 3:
       5     case 5:
       6     case 7:
       7     case 8:
       8     case 10:
       9     case 12:
      10         Console.Write($"{a}月共有31天");
      11         break;
      12     case 2:
      13         Console.Write($"{a}月共有28天");
      14         break;
      15     default:
      16         Console.Write($"{a}月共有30天");
      17         break;
      18 }    
      復制代碼

      3.三元運算符:適用于判斷有兩個結果的情況,可讀性較差

      1 Console.Write("請輸入一個整數:");
      2 int a = int.Parse(Console.ReadLine());
      3 Console.WriteLine(a > 10 ? $"{a}大于10" : $"{a}小于等于10");

      第一次用博客記錄,還存在很多不足之處,歡迎各位伙伴們給我提供寶貴的意見哦,哈哈!

      相關教程
      江苏快3 www.120782.com | www.32czj.com | www.56520d.com | e2649.com | www.55070j.com | 41178962.com | www.303053.com | www.910633.com | www.757q.com | www.89368.com | 2147006.com | www.33598q.com | www.j22365.com | 36406611.com | www.65707g.com | www.87680m.com | 15g4.net | www.71399h.com | www.76543b.com | 80850d.com | www.37266.co | www.2078b.com | 3659008.vip | www.84499z.com | www.h7788q.com | 12016.com | www.yh7774.com | www.js3034.com | 7720b.com | www.aobo196.com | www.2222558.com | 2864y.com | www.91233m.com | www.dhygw46.com | jidu999.com | www.igcp3.com | www.68suncitya.com | c5429.com | www.110879.com | www.578371.com | www.laok111.com | hhh2848.com | www.bi16.com | www.000162.com | 55323a.com | www.399146.com | www.3066qq.com | www.814suncity.com | 2324ppp.com | www.12455e.com | www.hqr66.com | c40033.com | www.314770.com | www.jsdc9000.com | www.2x0048.com | 4647c.com | www.776511.com | www.bwinyz12.com | www.6666wnsr.com | 4488aaa.com | www.177417.com | 315656.com | www.hc779.com | www.hg9777.com | 55967u.com | www.60007u.com | www.86267w.com | www.000243.com | ylzz2224.com | 320006.com | www.6cpb.com | www.38138l.com | www.11hggj.com | 5509u.com | www.610330.com | www.js89s.vip | www.58777r.com | 67890o.com | www.008.vip | www.511079.com | www.00778y.com | www.67797h.com | 5566bet.vip | www.271696.com | www.7249z.com | www.bte33.com | x08199.com | ylzz1112.cc | www.35155l.com | www.609024.com | www.ao599.com | q1458.com | www.376477.com | www.3398733.com | www.3844a.com | 3685t.com | 566671144.com | www.a11122.com | 1675gg.com | www.912199.com | www.97994d.com | www.jing7778.com | 20770000.com | 67890l.com | 5443qq.com | www.767387.com | www.095928.com | www.88c668.com | www.ag355.com | 635288.com | 77605i.com | www.550314.com | www.550021o.com | www.4963kk.com | www.09569u.com | xpj78333.com | 8037ggg.com | 33382kk.com | www.755903.com | www.065795.com | www.85857.com | www.333133o.com | 3225w.com | vip145b.com | w32689.net | www.808762.com | www.868339.com | www.4828778.com | www.775412.com | www.ds22222.com | 3416l.com | dsh3388.com | 8522bbbb.com | www.503662.com | www.50026c.com | www.w84v.com | www.00618d.com | www.688222.com | www.5665699.com | 6118k.com | 55.net | 6641q.com | www.423552.com | www.5091m.com | www.55676o.com | www.408477.com | www.308878.com | www.pjdc3388.com | 2934z.com | mmm40033.com | 0500h.com | 5003j.com | hg8893.com | www.685756.com | www.80767.com | www.55717q.com | www.26123gg.com | www.1880204.com | www.166249.com | www.hg08678.com | 444000u.com | 40686.com | 38818.com | 7141ee.com | 8381ll.com | www.602327.com | www.88cmc.com | www.bet365193.com | www.535086.com | www.829797c.com | www.hjcp8.com | www.tm003.cc | www.66146.net | www.655666b.com | www.88jt09.com | c51ki64.com | hgyz5.com | heji256.com | 7599.at | 08159z.com | 5855cc.com | 4880r.com | 068.cc | 20778866.com | 5651f.com | h99345.am | 2546u.com | m88bc.com | www.105180.com | www.243500.com | www.371935.com | www.565121.com | www.701504.com | www.cb2988.com | 1483nn.com | www.bet365193.com | www.282866.com | www.tyc1802.com | www.z0151.com | www.25288r.com | www.9068gg.com | www.hg8728.net | www.hg021.com | www.00829c.com | www.xpj88004.com | www.ssb999.com | www.84299.com | www.16297788.com | www.tyc1116.com | www.606881.com | www.hg8326.com | www.57798.com | www.203203.com | www.xiniguoji.com | www.299366.com | www.343478.com | www.5049r.com | www.c7205.com | www.sb5509.com | www.bet63p.com | www.83377.com | www.8577.com | www.84499r.com | www.3552m.com | www.2955.cc | www.011888a.com | www.638805.com | www.196346.com | 0289p.com | www.61655q.com | www.9j3.com | www.77786yh.com | www.h63568.com | www.70203d.cc | www.3126t.com | www.912156.com | www.423689.com | 59js.com | 459.com | 7514444.com | www.234265.com | 83378v.com | 505ooo.com | 0332q.com | 78332.com | 1624xx.com | www.h7788y.com | www.5577js.com | www.1168d.com | www.99552vv.com | www.tyc88555.com | www.914909.com | www.096308.com | 5000008018.com | 0652g.com | h08199.com | 998.cc | www.22753.com | www.01411.cc | www.88325x.com | www.188666.com | www.cp3.mobi | 7334t.com | 31325w.com | 2127123.com | www.8124e.com | www.z4777.com | www.biying940vip.com | www.89894m.com | www.901387.com | pj334433.com | 336.cc | 9995f.cc | www.xpj2025.com | www.47700.net | www.035647.com | www.843552.com | 305196.com | 9068e.com | feicai010.com | www.2566h5.com | www.19019x.com | www.390622.com | www.646452.com | 4323i.com | s40033.com | www.pj2026.com | www.m39955.com | www.12136u.com | www.22csj.com | 0652p.com | 3568q.com | 91019g.net | www.hg8443.com | www.n3410.com | www.6364x.com | 3379pp.com | 86226n.com | www.7435l.com | www.3846p.com | www.4331i.com | www.589467.com | 6423.com | emb8799.com | www.xn221.com | www.cb800.cc | www.208990.com | mayait.cn | www.a2a333.cc | www.20199jj.com | www.8d838.com | www.135368.com | 7134455.com | js345.com | www.b4127.com | www.580786.com | www.319126.com | 53262e.com | 1654ww.com | www.c948c.com | www.7714a.com | www.50052e.com | s58955.com | www.hg9093.com | www.n3065.com | www.23579b.com | 8036a.com | 55967q.com | www.hg9388.org | www.pj55712.com | www.584911.com | mi527.com | www.546001.com | www.hg98j.com | www.062wy.com | gm13800.com | 444p1.cc | www.811202.com | www.6661b.cc | ff555n.com | 58802l.com | www.565560.com | www.5441d.com | 13222a.com | 2767b.com | www.79500u.com | www.07813.com | 3550c.com | hrviip1.com | www.58118d.com | www.jx68.com | q86811.com | www.w8606.com | www.86339x.com | www.055168.cc | 22aa8332.com | www.1880204.com | www.15355d.com | e1458.com | 1156qq.com | www.6880hh.com | www.583477.com | v4255.com | www.vns3600.com | www.7239u.com | 11422s.com | www.00038js.com | www.js68111.com | www.444073.com | mm1915.com | www.255169.com | www.39459.cc | 44077k.com | www.299888.com | www.954321r.com | 2698c.com | www.77795.com | www.38vs88.com | 33pp8331.com | www.1869e.com | www.460017.com | 8cai29.com | 500000579.com | www.0169a.com | www.342377.com | bs78933.com | www.50999x.com | www.422689.com | 73055j.com | www.8967t.com | www.390126.com | 747720.com | www.4136f.com | www.303865.com | dz1666.com | www.38138r.com | 59964ww.com | 4637755.com | www.780780f.com | 3822m.com | www.2090988.com | www.yh76b.com | www.gssuu168.com | www.68682w.com | www.444216.com | 1234blr.com | www.35700d.com | 2247xx.com | www.323788.com | www.0659.com | hg0266.com | www.657714.com | www.570981.com | 168cp-u.com | www.lhg888.com | 66775004.com | www.55268uu.com | www.50080f.com | 44303.com | www.20199ii.com | www.178213.com | ms38648kk.cc | www.954321c.com | 8381d.com | www.6666hs.com | www.393411.com | 3844nn.com | www.fa7969.com | feicai00853.com | www.5566bifa.com | 56987jj.com | www.262xpj.com | www.39500y.com | p4212.com | www.8473y.com | vip66702.com | www.df5550.com | www.626310.com | www.005004.com | www.00018js.com | www.73166l.com | 4590x.com | 8827aa.com | www.3569f.com | www.2109j.com | 00aa8331.com | www.924924.com | 6644734.com | www.daf005.com | 5443yy.com | www.mmtx789.com | www.700539.com | 6567.com | www.66201.cc | 81366v.com | www.237377.com | 0644.com | www.a32031.com | u32365.com | www.20199oo.com | 5437e.com | www.57sun.com | www.146656.com | www.111xhtd.com | www.06czj.com | 3202j.com | www.71399j.com | 22299qq.com | www.fg9909.com | 51133q.com | www.1434i.com | 32666u.com | www.xpj5.net | 8381f.com | www.5886qq.com | 4116s.com | www.pjc66.vip | v939.com | www.56011o.com | 4018l.com | www.l63568.com | 36402211.com | www.383444.com | 53015.com | www.80767k.com | 168cp-z.com | www.99638.com | 3049b.com | www.72gcw.com | www.602msc.com | www.959557.com | www.28758g.com | www.534638.com | www.7830y.com | www.bizhong55.com | www.hg56783.biz | www.33598e.com | www.72tk.com | 313989.com | www.dzj0404.com | 71372226.com | www.7920.com | e86811.com | www.16878m.com | 80892ss.com | www.684344.com | www.362811.com | www.33112a.com | www.552567.com | 16630.com | www.a.1308pj.com | 11163355.com | www.50052vip.com | www.555545.com | www.351817.com | www.hg3626.com | 1114661.com | www.35700a.com | 4541u.com | www.66376j.com | 6146o.com | www.361770.com | www.988300.com | 80878e.com | www.258908.com | 3344000.com | www.55fzc.com | www.h7788v.com | qq3189.com | www.7415xx.com | 444167.com | www.76520b.com | www.hg992255.com | 7720v.net | www.86999a.com | 3435d.com | www.32123n.com | www.bet3651014.com | 445.com | www.cn365m.com | 22117n.com | www.c8712.com | www.hnjxjd.cn | 30007.com | www.280sun.com | 0080z.com | www.357173.com | www.a4042.com | aa4119.com | www.8499f.com | www.js9969.com | 32126l.net | www.9996yy.com | www.56733r.com | 11ii8331.com | www.1754y.com | 7744ccc.com | www.501354.com | www.5966ppp.com | 5414.com | www.cp3.xyz | www.8349.com | k67890.com | www.2222y.cc | www.66458v.com | dzj17.com | www.6364d.com | www.744suncity.com | 97987-6.com | www.50788r.com | www.9679k.com | o14666.com | www.71399f.com | www.619406.com | cp088t.com | www.78949t.com | www.wns8833.com | 983888e.com | www.53531.cc | www.xpj395.com | 0471sands.com | www.cb7188.com | www.rk1177.com | 55797e.com | www.542672.com | www.9737ss.me | 3169p.com | www.65866.com | m40033.com | www.910997.com | www.55c668.com | 70118e.com | www.140018.com | www.115527s.com | 88904242.com | 1466z.com | www.99383.com | www.3332xj.com | 36400077.com | www.560259.com | www.26123cc.com | wefa6.com | 33115aa.com | www.77803x.com | www.291tyc.com | 3640w.com | www.546868.com | www.bwinyz37.com | 23233h.com | n7742.com | www.8667i.com | www.449msc.com | 8977vv.com | 2334vip1.com | www.55768.cc | www.f8118.com | 3640xx.com | www.xinyc3.com | www.o94600.com | www.13658017870.com | 4167r.com | www.517411.com | www.60886r.com | www.hg002222.com | 5003822.com | www.608115.com | www.766159.com | www.558809.com | 97987-3.com | www.303473.com | www.1434c.com | www.0686c.com | jib666666.com | 64111g.com | www.3978l.com | www.jlh01.com | r35151.com | c558.cc | www.27czj.com | www.55060f.com | www.0887788.com | 84499922.com | www.89894e.com | www.6939r.com | www.04080.com | 2479.com | 1679bb.com | www.652531.com | www.52062e.com | www.192299.com | 2677ttt.com | 7893w41.com | www.974091.com | www.38775oo.com | www.k66111.com | ued888.com | 0239.cc | www.576590.com | www.x22678.com | www.993456.com | 55nn8331.com | 35222.com | www.187516.com | www.bet5959.com | www.ggt.99233t.com | www.39695.com | 4022y.com | qg0707.com | www.hy2721.com | www.77785yh.com | www.hg8779.com | 228888r.com | 0198800.com | 3379v.com | www.3136aa.com | www.50685a.com | www.331333.com | 937012.com | blm877.com | 9498.com | www.610958.com | www.ya2019h.com | www.0662777.com | www.js520234.com | f35151.com | 3414400.com | 3121t.com | www.921977.com | www.6939o.com | www.97060h.com | www.425suncity.com | 027056.com | 287733.com | sxpj62617.com | www.599581.com | www.22062d.com | www.00778l.com | www.593333.com | www.0636d.com | 52599n.com | 37775145.com | 4647033.com | www.530951.com | www.60108x.com | www.p2894.com | www.3171114.com | www.7830s.com | 83377h.com | 22296beijin.com | 4995o.com | 3434b.com | www.567610.com | www.00840g.com | www.bb888.cc | www.55060k.com | www.8882244.com | www.hg56777.com | p35151.com | 4488zzz.com | ww444hg.co | 3559qqqq.com | www.35918i.com | www.799436.com | www.80767.com | www.y07b.com | www.390292.com | www.796813.com | www.65175.com | www.39695m.com | pjanhui.com | b9962.com | 81366r.com | hb1432.com | 3344blg.com | www.36166a.com | www.565639.com | www.hcjt8.com | www.50054x.com | www.hg77033.com | www.993776.com | www.57800m.com | www.hjcp2.com | www.k444.net | www.330099f.com | www.888vh.com | 5456t.com | 3189q.com | 7720t.net | cc3405.com | 4270bb.com | 111hg88.com | amhj.com | 9339999l.com | 1675gg.com | 365355.com | 74395555.com | wb8.com | www.43818u.com | www.335324.com | www.545680.com | www.953500.com | www.can80.com | www.3479s.com | www.29277f.com | www.86267y.com | www.08088.com | www.yh66266.com | www.js520988.com | www.tyc19988898.com | www.7920h.com | www.78680s.com | www.0033sun.com | www.026688.com | www.ba505.com | www.bb00668.com | www.63606c.com | www.834546.com | www.60886b.com | www.883399e.com | www.14168c.com | www.12136w.com | www.495.bb | www.1466d.com | www.6011888.com | www.8d818.com | www.80065f.com | www.26299s.com | www.3552g.com | www.dan03.com | www.988068.com | www.802633.com | www.607265.com | www.472717.com | www.197802.com | 32424b.com | ambyc9.com | 6396o.com | 1770m.com | 7894v.com | 53358q.com | 20160044.com | 83086t.com | 2546s.com | www.hg252.com | www.wnsr878.com | www.sbet818.com | www.hg123300.com | www.99498.com | www.1200msc.com | www.28000l.com | www.2021o.com | www.86339i.com | www.6613622.com | www.37676.cc | www.919588.com | 67890vv.com | www.c3004.com | www.621411.com | www.143552.com | 9902666.com | 566670011.com | 883399l.com | w7667.com | n2649.com | www.s8866.com | www.cs11666.com | www.hg8270.com | www.wy8008.com | www.3032mm.com | www.66655.com | www.6769l.com | www.689632.com | 38989s.com | vns7.vip | bbinsupport.com | 00774vv.com | n07958.net | www.2846k.com | www.0724drf.com | www.115203.com | www.7240v.com | www.6611f.cc | www.393411.com | 6hcc88.com | 6118.com | yhshanghai.vip | www.4759ss.com | www.q24135.com | www.609024.com | www.792085.com | www.89979.cc | www.407870.com | 32126c.net | abf386.com | 3189vip.com | www.67797s.com | www.0077jj.com | www.1011777.com | www.91233q.com | www.629965.com | 0033v.cc | k60111.com | 11555002.com | www.456228.com | www.3939mmm.com | www.jz95566.com | www.713929.com | www.cf9903.com | 33115hh.com | tt888g.com | 99151f.com | www.vns2016.com | www.3300ra8.com | www.81678k.com | www.541911.com | 86811oo.com | hwcp3333.com | www.hg31188.com | www.132c73.com | www.120668.com | www.846689.com | 3788u.com | 3846zzz.com | www.36530088.com | www.85857y.com | www.830363.com | www.595121.com | 7394444.com | man153.com | www.32666x.com | www.sha2333.com | www.87467.com | 36518.info | 69111h.com | www.vns20033.com | www.falao268268.com | www.9996ii.com | www.590808.com | 66331381.com | 28758x.com | www.julongjy888.com | www.r999999.com | www.986799.com | 4052a.com | nn500c.com | www.hg10500.com | www.r999994.com | www.739750.com | 2381r.com | 3136mm.com | www.44679.com | www.ylylc09.com | www.303473.com | 0208.com | www.am1666.com | www.gm41.com | www.7782p.com | 7720q.net | fll8.in | www.9969365.com | www.1449.com | www.376513.com | 11557076.com | www.223456f.com | www.316088.com | www.rrle6.com | 0332g.com | 2247f.com | www.998855y.com | www.50788y.com | 444365ggg.com | 00ww8332.com | www.pj5577.com | www.hd5388.com | 660499.com | 6261bb.com | www.tk533.com | www.80075z.com | 69990u.com | 3ttlcp.com | www.38238y.com | www.26163c.com | 2677lll.com | 7935b.com | www.c7204.com | www.qml1.com | rr38648.cc | www.ao799.com | www.3066vv.com | www.610659.com | b1458.com | www.35441777.com | www.81608d.com | 73055x.com | 50067s.com | www.333777j.com | www.5441j.com | 66889193.com | www.vns7777.cc | www.44118h.com | www.292199.com | jj67890.com | www.hg7850.com | www.81233cc.com | 914907.com | www.vns8895.com | www.vnsr938.com | www.245568.com | pj900.cc | www.tyc002.com | www.ascp3.com | 496.vc | www.658226.com | www.77802m.com | oo44442.com | www.830678.com | www.138.net | 1422b.com | 365vip07.win | www.4196u.com | www.081510.com | 8827jj.com | www.89599o.com | www.423770.com | youfa22.vip | www.369038.com | www.901370.com | 4488ss.com | www.448868.com | www.hqcp6.com | 4165u.com | www.643sunbet.com | www.hx1177.com | 3559llll.com | www.358vns.com | www.934680.com | 61665.com | www.zte666.com | www.771745.com | 32424e.com | www.jy878.com | www.582062.com | wnsr8807.com | www.4058a.com | www.053883.com | 87665n.com | www.2997774.com | 73999w.com | www.7669a.net | www.7714p.com | 9955vn77.com | www.1516yyy.com | www.1368t.cc | 3471.com | www.xxcp.com | www.266991.com | 8036ss.com | www.12136x.com | 16690077.com | www.55268pp.com | www.00840s.com | o7742.com | www.3533msc.com | www.503501.com | 2267o.com | www.blr5544.com | jr7777.com | www.999dhygw.com | www.33fzc.com | 00774kk.com | www.bwinyz12.com | 28758w.com | www.747365d.com | www.33588j.com | 4005.com | www.19yh6.com | 44ii8332.com | www.yhuuu.com | www.35155b.com | so444.cc | www.55070m.com | 3024u.com | www.115888.com | www.022jx.cc | 70118o.com | www.62979d.com | 2455o.com | www.xin8884.com | www.558421.com | 4694c.com | www.bet365195.com | hg0068g.com | www.88166f.com | hh697.cn | www.99927nn.com | www.810526.com | hhhhh222.com | www.hg9377.com | 33432l.com | www.4078n.com | 3552d.com | www.280999.com | www.530995.com | 28455.com | www.36166b.com | 78115577.com | www.776887.com | 1665hh.com | www.2945a.com | n00351.com | www.pj1098.com | www.599439.com | www.9464hh.com | www.3668o.com | 33ff940.com | www.89777p.com | 3559cp.net | www.86339b.com | 69441133.com | www.yh234f.com |