标题:能讲一下这些代码的功能不 新手
取消只看楼主
huazai2012s
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2012-10-29
结帖率:33.33%
已结贴  问题点数:20 回复次数:0 
能讲一下这些代码的功能不 新手
           Console.WriteLine("creating objict myobj...");
            myclass myobj = new myclass("my object");
            Console.WriteLine("myobj created.");
            for (int i = -1; i <= 0; i++)
                try
                {
                    Console.WriteLine("\nattempting to assign {0} to myobj.val...", i);
                    myobj.val = i;
                    Console.WriteLine("ValueType {0} assigned to myobj.val.", myobj.val);
                }
                catch (Exception e)
                {
                    Console.WriteLine("exception {0} thrown.",e.GetType().fullname);
                    Console.WriteLine("message :\n\"{0}\"",e.message);
                }
         }
搜索更多相关主题的帖子: created creating assigned 
2012-10-29 10:54



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-384797-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.053731 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved