国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > .NET > 正文

自定義類(ASP.NET_VB)

2024-07-10 12:56:38
字體:
來源:轉載
供稿:網友


 

imports system.diagnostics

public class fsvcommon

    '********************************************************************************************
    '功能  :關閉指定進程
    '參數  :processname:進程名
    '返回值:無
    '上傳時間:2005/04/18
    '********************************************************************************************
    public shared function killprocess(byval processname as string)
        dim pprocess() as process     '進程序列
        dim myprocess as process      '進程名

        pprocess = process.getprocessesbyname(processname)
        '查找所指定的進程
        for each myprocess in pprocess
            myprocess.kill()
        next
    end function

    '********************************************************************************************
    '功能  :計算指定字符串的長度(web)
    '參數  :txtstring:指定字符串
    '返回值:長度
    '上傳時間:2005/04/18
    '********************************************************************************************
    private function getlength(byval txtstring as string) as integer
        dim textlength as integer                         '字符串的長度
        textlength = txtstring.length

        dim i as integer                                  '循環變量

        for i = 0 to txtstring.length - 1
            '是否為全角字符的判斷
            if not (0 <= asc(txtstring.substring(i, 1)) _
                and asc(txtstring.substring(i, 1)) <= 255) and _
                not (65377 <= asc(txtstring.substring(i, 1)) _
                and asc(txtstring.substring(i, 1)) <= 65439) then
                textlength = textlength + 1
            end if
        next

        return textlength
    end function

end class


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 峨眉山市| 全南县| 宁乡县| 双牌县| 临武县| 稷山县| 巴南区| 哈密市| 凤台县| 天长市| 长治县| 抚顺县| 新化县| 伊春市| 新和县| 衡东县| 乌恰县| 山东| 武陟县| 温州市| 淮滨县| 探索| 仁怀市| 霍州市| 大英县| 白朗县| 海城市| 福安市| 昭苏县| 竹溪县| 鹤岗市| 托克托县| 玛沁县| 博野县| 包头市| 马山县| 金秀| 平湖市| 宕昌县| 原阳县| 宁安市|