C#的结构体用法(原创)--王超C#

enum sex
    { 
        nan=3,
        nv
    }
    struct wang
    {
        public sex s;
        public string name;
    }
    class Program
    {
        static void Main(string[] args)
        {
            //sex w = sex.nan;
            int i = 4;
            sex k = (sex)i;

            wang w;
            w.name = "";
            w.s = sex.nan;
            Console.WriteLine(k);
            Console.ReadKey();

        }
    }

 

posted on 2013-01-16 17:08  王超  阅读(185)  评论(0)    收藏  举报