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

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

結構體

2019-11-11 05:10:04
字體:
來源:轉載
供稿:網友
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();        }    }}
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 宜春市| 余庆县| 永泰县| 新邵县| 疏勒县| 新兴县| 邹平县| 海林市| 拜城县| 扶沟县| 三穗县| 北辰区| 尉犁县| 凤凰县| 水城县| 正定县| 雷山县| 岳阳县| 双辽市| 靖远县| 河曲县| 保山市| 驻马店市| 岳普湖县| 灯塔市| 鹤峰县| 磐石市| 通渭县| 唐山市| 大连市| 锡林浩特市| 隆德县| 伊宁县| 永寿县| 黄平县| 辽源市| 安阳县| 惠水县| 甘泉县| 吉林市| 车险|