国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

結構體

2019-11-11 04:36:30
字體:
來源:轉載
供稿:網友
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace 結構體{    class PRogram    {        static void Main(string[] args)        {            //設置控制臺字體顏色  前景色            Console.ForegroundColor = ConsoleColor.Black;            Console.BackgroundColor = ConsoleColor.Yellow;            //不new 就能用是有條件的,  必須是公有的成員變量,不能是私有再封裝的            Student stu;            stu.age = 20;            stu.Say();            Console.ReadKey();        }    }}
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace 結構體{    //1.結構體是值類型    //2.結構體可以不new直接使用,但是是有條件的    //3.不能對結構體中的成員變量賦初值    //4.聲明結構的對象后,必須對結構的成員賦初值    public struct Student    {        public int age;        public void Say()        {            Console.WriteLine("Say");            Console.ReadLine();        }    }}
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 遵义市| 峨边| 建德市| 长泰县| 关岭| 维西| 扎兰屯市| 斗六市| 阿图什市| 连州市| 朔州市| 海门市| 黎川县| 宜良县| 年辖:市辖区| 习水县| 苍山县| 嘉善县| 周口市| 龙井市| 漠河县| 田林县| 奈曼旗| 三都| 康定县| 黄浦区| 康定县| 永顺县| 抚顺市| 峨眉山市| 阜阳市| 延津县| 从江县| 横峰县| 新民市| 明溪县| 城固县| 太仆寺旗| 海阳市| 隆昌县| 石河子市|