冷眼 - 技術專欄

          態度決定高度,責任勝于能力;思想比知識更重要,成長比成功更重要!

             :: 首頁 ::  :: 聯系 ::  :: 管理 ::
            14 隨筆 :: 13 文章 :: 0 評論 :: 0 Trackbacks
          <%
          Class Rectangle
          ???Private intWidth
          ???Private intHeight

          ???Public Property Let width(iWidth)
          ??????intWidth =?iWidth
          ??????'參數驗證略
          ???End Property

          ???Public Property Let height(iHeight)
          ??????intHeight =?iHeight
          ??????'參數驗證略
          ???End Property

          ???Private Sub Class_Initialize
          ??????'類初始化代碼
          ???End Sub

          ???Public Function perimeter()
          ??????'返回矩形的周長
          ??????getResult = 2*(intHeight + intWidth)
          ???End Function

          ???Private Sub Class_Terminate
          ??????'類銷毀時執行的代碼
          ???End Sub

          End Class


          '調用類
          Dim obj
          Set objRectangle = new Rectangle
          objRectangle.width = 10
          objRectangle.height = 20
          Response.Write(objRectangle.perimeter())
          Set?objRectangle = Nothing
          %>
          posted on 2008-05-26 16:53 冷眼 閱讀(431) 評論(0)  編輯  收藏 所屬分類: ASP
          主站蜘蛛池模板: 长泰县| 东至县| 威远县| 宝丰县| 通城县| 西青区| 华亭县| 湖南省| 抚松县| 五指山市| 阿尔山市| 霍山县| 定边县| 怀来县| 阜宁县| 建湖县| 漳平市| 蛟河市| 壶关县| 辛集市| 卓尼县| 汉源县| 苍南县| 航空| 民和| 茶陵县| 吉安县| 新乡县| 永康市| 峨边| 岑溪市| 扬州市| 长宁县| 翼城县| 孝感市| 九龙县| 搜索| 方正县| 南靖县| 恩平市| 上思县|