S2t40. Depth. NET platform and C # programming) Chapter fourth. Brief answer 5. Lixiangyang. 20170406

Source: Internet
Author: User

---restore content starts---

1============ Wizard Class =============2 usingSystem;3 usingSystem.Collections.Generic;4 usingSystem.Linq;5 usingSystem.Text;6 usingSystem.Threading.Tasks;7 8 namespacej5.entity9 {Ten     /// <summary> One     ///Wizarding Class A     /// </summary> -     Public  classWS -     { the          Public stringJibie {Get;Set; }//level -          Public intZhandou {Get;Set; }//Combat Effectiveness -          Public intshenming {Get;Set; }//Health Value -        /// <summary> +        ///Construct a -        /// </summary> +          PublicWS () A         { at              This. Shenming =10000; -         } -        /// <summary> -        ///Construction Two -        /// </summary> -        /// <param name= "JB" ></param> in        /// <param name= "ZDL" ></param> -        /// <param name= "SM" ></param> to         PublicWS (stringJbintZdlintSM) +         { -              This. Jibie =JB; the              This. Zhandou =Zdl; *              This. Shenming =SM; $         }Panax Notoginseng        -        /// <summary> the        ///Display Information +        /// </summary> A         Public voidInfo () the        { +Console.WriteLine ("The wizard's level is: {0}, fighting capacity is: {1}, Health value: {2}", Jibie, Zhandou, shenming); -        } $     } $}
View Code
1=========== Test Class ===========2 usingSystem;3 usingSystem.Collections.Generic;4 usingSystem.Linq;5 usingSystem.Text;6 usingSystem.Threading.Tasks;7 usingj5.entity;8 9 namespaceJ5Ten { One     class Program A     { -         Static voidMain (string[] args) -         { theWS WS =NewWS ();  -Ws. Jibie ="Intermediate";//level -Ws. Zhandou = -;//Combat Effectiveness - ws. Info (); + Console.WriteLine (); -WS ws1 =NewWS ("Intermediate", the,99999); + ws1. Info (); A Console.read (); at            -         } -     } -}
View Code

S2t40. Depth. NET platform and C # programming) Chapter fourth. Brief answer 5. Lixiangyang. 20170406

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.