program.cs

来自「嵌入式开发从基础到提高」· CS 代码 · 共 35 行

CS
35
字号
using System;
using System.Collections.Generic;
using System.Text;

namespace 构造函数
{
/************************
* 程序描述:构造函数的实例
* 创 建 人:ncbcy@eiTarget
* 版 本 号:1.0.0
* 修改记录:0
***********************/
    class Program
    {
        static void Main(string[] args)
        {
            PersonInfo P001 = new PersonInfo(001,"女",165);
            Console.WriteLine(P001.pid + "\t" + P001.sex + "\t" + P001.tall);
            Console.ReadLine();
        }
    }
    class PersonInfo
    {
        public int pid;
        public string sex;
        public int tall;
        public PersonInfo(int gpid, string gsex, int gtall)
        {
            pid = gpid;
            sex = gsex;
            tall = gtall;
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?