能讲一下这些代码的功能不 新手
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);
}
}