易截截图软件、单文件、免安装、纯绿色、仅160KB

C#取得域名以及目录地址的方法

using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
namespace SinvanCMS.Common
{
    /// <summary>
    /// 全局类,当前域名,物理路径
    /// </summary>
    public class Application
    {
        /// <summary>
        /// 获得url路径, http://localhost/www_dalian/fangyuan.asp 的app部分如:http://localhost/www_dalian
        /// </summary>
        public static string AppUrl
        {
            get
            {
                return "http://" + System.Web.HttpContext.Current.Request.Url.Host.ToString() + AppSiteName;
            }
        }
        /// <summary>
        /// 获得 http://localhost/www_dalian/fangyuan.asp 的 部分如:www_dalian
        /// </summary>
        public static string AppSiteName
        {
            get
            {
                string SiteAddress = "";
                SiteAddress = System.Web.HttpContext.Current.Request.ApplicationPath.ToString();
        


相关文档:

图片文件上传, 生成高质量缩略图 (asp.net c#)

后台代码:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Dat ......

[摘自c#Bible]c#中namespace的使用(命名空间)

The C# classes that you design will be used by code that you write and possibly by code that
other people write. Your C# classes may be used by a VB.NET application or from within an
ASP.NET page. Moreover, your classes may very well be used alongside other classes
designed by other .NET develope ......

方法多态与Duck typing;C#之拙劣与F#之优雅

文 / 李博(光宇广贞)
方法多态与类型多态
       了解 OOP 的同学对类型多态都很熟悉了。话说,类型多态之多态便体现在方法上,那方法多态又是嘛玩儿?类型多态之类型指的是对像的类型,其方法是受对像约束的。方法多态便是不受对像类型约束的多态。具体区别在:

方法多态无需继承 ......

asp.net(c#) static关键字用法小结[zz]

http://ayic1.blog.163.com/blog/static/27343030200965103528805/
静态变量
       当我们编写一个类时,其实就是在描述其对象的属性和行为,而并没有产生实质上的对象,只有通过new关键字才会产生出对象,这时系统才会分配内存空间给对象,其方法才可以供外部调用。
  & ......

VB/C++/C#串口通讯源代码【附详细注释】


VB
    If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
    MSComm1.CommPort = i1
    MSComm1.PortOpen = True
    MSComm1.InputMode = comInputModeBinary
    MSComm1.InBufferCount = 0
& ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号