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

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

結構體

2019-11-11 06:37:36
字體:
來源:轉載
供稿:網友
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();        }    }}
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 高邑县| 集贤县| 丹阳市| 西城区| 普兰店市| 珠海市| 宁强县| 淄博市| 蒲城县| 正镶白旗| 自治县| 东阿县| 阜阳市| 安溪县| 驻马店市| 汝阳县| 海兴县| 昌都县| 广水市| 抚顺市| 龙陵县| 淳安县| 西乡县| 鄯善县| 婺源县| 凭祥市| 千阳县| 长乐市| 昆明市| 博野县| 雅安市| 永州市| 福建省| 绥芬河市| 故城县| 台江县| 五指山市| 兰坪| 皮山县| 类乌齐县| 和顺县|