国产探花免费观看_亚洲丰满少妇自慰呻吟_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();        }    }}
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 玉环县| 葵青区| 自贡市| 桓台县| 衡阳县| 仙居县| 色达县| 巢湖市| 大新县| 东海县| 奇台县| 云霄县| 南宁市| 堆龙德庆县| 阿合奇县| 松滋市| 化州市| 大新县| 方山县| 安图县| 安国市| 会泽县| 江北区| 大足县| 怀化市| 栾川县| 元朗区| 呼和浩特市| 平谷区| 应城市| 东乡县| 富源县| 凌云县| 临桂县| 同江市| 阜城县| 襄樊市| 玉林市| 玉溪市| 镇坪县| 赣榆县|