Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C#(ASP.Net)»ñÈ¡µ±Ç°Â·¾¶µÄ·½·¨¼¯ºÏ

//»ñÈ¡µ±Ç°½ø³ÌµÄÍêÕû·¾¶£¬°üº¬ÎļþÃû(½ø³ÌÃû)¡£  
string str = this.GetType().Assembly.Location;  
result: X:\xxx\xxx\xxx.exe (.exeÎļþËùÔÚµÄĿ¼+.exeÎļþÃû)  
//»ñÈ¡Ð嵀 Process ×é¼þ²¢½«ÆäÓ뵱ǰ»î¶¯µÄ½ø³Ì¹ØÁªµÄÖ÷Ä£¿éµÄÍêÕû·¾¶£¬°üº¬ÎļþÃû(½ø³ÌÃû)¡£  
string str = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;  
result: X:\xxx\xxx\xxx.exe (.exeÎļþËùÔÚµÄĿ¼+.exeÎļþÃû)  
//»ñÈ¡ºÍÉèÖõ±Ç°Ä¿Â¼£¨¼´¸Ã½ø³Ì´ÓÖÐÆô¶¯µÄĿ¼£©µÄÍêÈ«ÏÞ¶¨Â·¾¶¡£  
string str = System.Environment.CurrentDirectory;  
result: X:\xxx\xxx (.exeÎļþËùÔÚµÄĿ¼)  
//»ñÈ¡µ±Ç° Thread µÄµ±Ç°Ó¦ÓóÌÐòÓòµÄ»ùĿ¼£¬ËüÓɳÌÐò¼¯³åÍ»½â¾ö³ÌÐòÓÃÀ´Ì½²â³ÌÐò¼¯¡£  
string str = System.AppDomain.CurrentDomain.BaseDirectory;  
result: X:\xxx\xxx\ (.exeÎļþËùÔÚµÄĿ¼+"\")  
//»ñÈ¡ºÍÉèÖðüº¬¸ÃÓ¦ÓóÌÐòµÄĿ¼µÄÃû³Æ¡£  
string str = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase;  
result: X:\xxx\xxx\ (.exeÎļþËùÔÚµÄĿ¼+"\")  
//»ñÈ¡Æô¶¯ÁËÓ¦ÓóÌÐòµÄ¿ÉÖ´ÐÐÎļþµÄ·¾¶£¬²»°üÀ¨¿ÉÖ´ÐÐÎļþµÄÃû³Æ¡£  
string str = System.Windows.Forms.Application.StartupPath;  
result: X:\xxx\xxx (.exeÎļþËùÔÚµÄĿ¼)  
//»ñÈ¡Æô¶¯ÁËÓ¦ÓóÌÐòµÄ¿ÉÖ´ÐÐÎļþµÄ·¾¶£¬°üÀ¨¿ÉÖ´ÐÐÎļþµÄÃû³Æ¡£  
string str = System.Windows.Forms.Application.ExecutablePath;  
result: X:\xxx\xxx\xxx.exe (.exeÎļþËùÔÚµÄĿ¼+.exeÎļþÃû)  
//»ñȡӦÓóÌÐòµÄµ±Ç°¹¤×÷Ŀ¼(²»¿É¿¿)¡£  
string str = System.IO.Directory.GetCurrentDirectory();  
result: X:\xxx\xxx (.exeÎļþËùÔÚµÄĿ¼) 
//»ñÈ¡µ±Ç°½ø³ÌµÄÍêÕû·¾¶£¬°üº¬ÎļþÃû(½ø³ÌÃû)¡£
string str = this.GetType().Assembly.Location;
result: X:\xxx\xxx\xxx.exe (.exeÎļþËùÔÚµÄĿ¼+.exeÎļþÃû)
//»ñÈ¡Ð嵀 Process ×é¼þ²¢½«ÆäÓ뵱ǰ»î¶¯µÄ½ø³Ì¹ØÁªµÄÖ÷Ä£¿éµÄÍêÕû·¾¶£¬°üº¬ÎļþÃû(½ø³ÌÃû)¡£
string str = System.Diagnostics.Process.GetCurrentPro


Ïà¹ØÎĵµ£º

C#ÓëFlash½»»¥

C#ÓëFlash½»»¥ £¨×ª×ÔСÀÚÔÚÏߣ©
C#ÓëFlash½»»¥
ǰ¶ÎÈÕ×Ó¹«Ë¾ÒªÇó×öÒ»¸öC#ÓëFlash½»»¥µÄ¶«Î÷£¬ÓÃÀ´C#Óë¶ÌÐÅèͨѶ½«Êý¾Ý´«µ½FlashÉÏÏÔʾÓë²Ù×÷µÄÓ¦Óá£
µÚÒ»²½C#Ìí¼Ó×é¼þ
´ò¿ªVS2005-¹¤¾ß-Ñ¡Ôñ¹¤¾ßÏäÏî-COM×é¼þ-Ñ¡ÔñShockwave Flash Object-È·¶¨
Ìí¼ÓºÃ×é¼þÍù³¡¾°ÉÏÍÏ·Å£¬Èç¹ûÌáʾע²áÐèÇó×¢²á
c# ×¢²á¿Ø¼þ-ÔÚÔËÐÐÊä ......

C#ÖеÄ==,!=µÈ·ûºÅÖØÔØ£¬ÒÔ¼°ÖØÔصȺŲÙ×÷

ͨ¹ýÒ»¸öʵ¼ÊµÄÀý×ÓÀ´½éÉÜ¡£ÆäÖÐÖØÔØ==£¬!=,Equal,GetHashCodeº¯Êý¡£
public class Record
{
public string[] arr = null;
public bool hasEqual = false;
//ÖØÔØÒ»¸öϱêÔËËã·ûºÅ
public string this[int index]
{
get
{
return arr[index];
}
set
{
arr[index] = value;
}
}
public override int GetHas ......

c# ref²ÎÊý´«µÝÕæÃæÄ¿

   c#ÖÐÁ½ÖÖ²ÎÊý´«µÝ·½Ê½£¬refºÍ·Çref£¬Ò»Ð©ÈË»á¾õµÃÊÇ·ñ²ÉÓÃref´«µÝ»áÓиü¸ßµÄЧÂÊ£¬Êµ¼ÊÄØ£¿ÏÂÃæ·Ö±ð¿´Ï¡£
   1¡¢ÖµÀàÐͲÎÊývoid FuncA(int iArg1,double dArg1,ref int iArg2,ref double dArg2)¡£
       iArg1ºÍdArg1²»¼Óref£¬´ËʱµÄÈ·»áÔÚÕ»À�±´Ò»·ÝÖµ£¬µ«Í¬Ê ......

ASP.NET application and page life cycle 2

http://www.codeproject.com/KB/aspnet/ASPDOTNETPageLifecycle.aspx?msg=3443071#xx3443071xx
ASP.NET application and page life cycle
Introduction
The Two step process
Creation of ASP.NET environment
Process request using MHPM events fired
In What event we should do what?
A sample code for demons ......

ASP.NET ½Å±¾¹ýÂË ·ÀÖ¹¿çÕ¾½Å±¾¹¥»÷

/// <summary>
    /// HTML½âÂë
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    public string HtmlDecode(string input)
  &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ