C# 中的结构体 struct

using System;
struct MikeCat
{
    public string Mike;//user
    public uint Age;//age
    public string Email;//email
}

class mf
{
    public static void Main()
    {
         MikeCat zl;//声明结构体类型变量zl
         zl.Name="迈克老猫";
         zl.Age=24;
         zl.Email="mike@hebut.com";
         Console.WriteLine("姓名:{0},年龄:{1},邮箱{2}",zl.Name,zl.Age,zl.Email);
    }
}

posted @ 2007-11-29 09:29  彭成刚  阅读(251)  评论(0编辑  收藏  举报