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

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

結構體

2019-11-11 05:45: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();        }    }}
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 临沭县| 商都县| 杭州市| 腾冲县| 敦化市| 余庆县| 克拉玛依市| 视频| 华坪县| 尖扎县| 正宁县| 肇州县| 保德县| 襄城县| 兰州市| 云霄县| 琼海市| 日照市| 台中县| 凤阳县| 涡阳县| 高安市| 临潭县| 大埔县| 新竹市| 利川市| 公安县| 伊宁县| 抚远县| 丘北县| 屯门区| 吉林市| 额尔古纳市| 保山市| 桃园县| 清涧县| 清镇市| 岳普湖县| 东源县| 张掖市| 文昌市|