Csharp+Asp.net系列教程(四)[3]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 mikecat888 的 blog

             myobjects[2] = "hello";
             myobjects[3] = 123;
             myobjects[4] = 123.4;
             myobjects[5] = null;
             for (int i=0; i<myobjects.length; ++i)
             {
             string s = myobjects[i] as string;
             console.write ("{0}:", i);
             if (s != null)
             console.writeline ( "'" + s + "'" );
             else
             console.writeline ( "not a string" );
             }
             }
            }
            输出
            0:not a string
            1:not a string
            2:'hello'
            3:not a string
            4:not a string
            5:not a string
        14.new 操作符
                new操作符用于创建一个新的类型实例,有三种形式:

本文关键:asp.net csharp
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top