简洁实用Socket框架DotNettySocket(socket语句)
263
2022-08-01
using System;
namespace program
{
enum WeekDays
{
a,//0
b,//1
c = 11,//11 赋值以后就变成11,不赋值就是2
d,//12
e,//13
f,//14
g//15
}//不能输入数字
struct student {
public string name;
public char sex;
public int age;
}
class program1
{
static void Main(string[] args)
{
WeekDays letter;
letter = WeekDays.e;
for (letter = 0; letter < WeekDays.g; letter++)
{
Console.WriteLine(letter);//看看枚举里的值到底是多少
}
student Bruce;//结构体的运用
Bruce.age = 18;
Bruce.name = "布鲁斯";
Bruce.sex = '男';
student Talyo;
Talyo.age = 19;
Talyo.name = "泰勒";
Talyo.sex = '女';
Console.WriteLine("姓名:{0}",Bruce.name);
Console.WriteLine("年龄:{0}",Bruce.age);
Console.WriteLine("性别:{0}",Bruce.sex);
Console.WriteLine("姓名:{0}",Talyo.name);
Console.WriteLine("年龄:{0}", Talyo.age);
Console.WriteLine("性别:{0}", Talyo.sex);
}
}
}
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~