当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: 使用 System.Environment 类 System.Environment 类提供了若干不同的信息,如果没有这些信息,就需要进行多次 Windows API 调用。
 

 

 ·使用perl.net访问数据库    »显示摘要«
    摘要: 不只是vb.net,c#等微软的开发软件可以调用.net framework,据我所知至少有28中我知道的开发语言如何调用.net framework.下面我就给出一段事例,说明使用perl.net来访问数据库 <%@ page language="perl" %> <script runat="server"> u......
    摘要: 10 tips for great .net programming whether you re interested in windows forms, asp.net, web services, or the .net framework, these tips help you exploit the still young .net technology. by din......


使用.NET框架类替代API调用(二)

使用 system.environment 类

system.environment 类提供了若干不同的信息,如果没有这些信息,就需要进行多次 windows api 调用.使用 system.environment 可以检索: 有关可用驱动器的信息(getlogicaldrives 方法) windows 启动后的毫秒数(tickcount 属性) 一般环境设置(由 currentdirectory.machinename.osversion.systemdirectory.userdomainname.userinteractive.username 与 workingset 属性提供) 特定文件夹列表(使用 getfolderpath 方法提供) 如果您使用过 windows api,您将知道选择方法与属性将代替很多 api 调用,包括 gettickcount.getlogicaldrives.getsystemdirectory.getcomputername.getusername 以及 getversionex 等等. 在图 4(单击主窗体上的 environment info [环境信息])所示的示例窗体中,在靠近顶部的列表框中显示了执行 getlogicaldrives 方法的结果,其中包括所有特定文件夹的列表(使用 getfolderpath 方法检索).在窗体下部的列表框中,显示了该类的许多属性的运行结果.
...   下一页
    摘要: mono 计划―linux版.net平台 c ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE