爲什麼下面的代碼不能編譯(snippet)?C##if/#ifdef語法不能編譯,爲什麼?
public enum ApplicationType : int
{
CONSOLE = 1,
WINDOWS_FORMS = 2,
ASP_NET = 3,
WINDOWS_SERVICE = 4,
MUTE = 5
}
//#if(false)
//#if (DEBUG && !VC_V7)
#if(m_iApplicationType != ApplicationType.ASP_NET )
public class HttpContext
{
public class Current
{
public class Response
{
public static void Write(ref string str)
{
Console.WriteLine(str);
}
}
}
}
#endif
錯誤訊息和細節? – 2010-08-25 20:00:27