我使用简单的3层架构.在这里我使用DTO类在UI,BL和DL之间进行通信.那么层之间的沟通有更好的方法吗?或者这是正确的方法?
为什么我们需要像Factory,Abstract Factory和Singleton这样的设计模式?
我在Mozilla Firefox中异步使用XMLHttp对象时遇到以下异常.
407 Proxy Authentication Required
The ISA Server requires authorization to fulfill the request.
Access to the Web Proxy filter is denied.
Run Code Online (Sandbox Code Playgroud)
实际上我正在尝试使用get in javascript进行异步请求.它使用IE 6工作正常,但对于IE 7和Firefox 3.5,它将不会使用异步请求获取任何数据,那么如何克服这个问题呢?
当我使用firebug在Firefox 3.5中进行调试时,它会显示出来
407 Proxy Authentication Required The ISA Server requires authorization to fulfil the request. Access to the Web Proxy filter is denied.
Run Code Online (Sandbox Code Playgroud)
控制台上的异常如何解决这个问题
注意:我们的网络有代理服务器
嘿,嗨我想要限制对象创建意味着一个类最多可以假设4个对象不超过如何实现这个?
每当我使用委托更新Windows窗体中的UI时,它会给我跨线程异常,为什么会发生这种情况?是否为每个代表调用启动了新线程?
void Port_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
//this call delegate to display data
clsConnect(statusMsg);
}
protected void displayResponse(string resp)
{
//here cross thread exception occur if directly set to lblMsgResp.Text="Test";
if (lblMsgResp.InvokeRequired)
{
lblMsgResp.Invoke(new MethodInvoker(delegate { lblMsgResp.Text = resp; }));
}
}
Run Code Online (Sandbox Code Playgroud) 使用XDocument与xpath解析XML哪一个是性能比较好?
例如,在xml中搜索标签并获取值
tags = xmlDoc.Descendants(xmlTag);
Run Code Online (Sandbox Code Playgroud)
要么
xml.SelectSingleNode("//root/node")
Run Code Online (Sandbox Code Playgroud)
那么哪一个会更快?
c# ×4
oop ×2
3-tier ×1
ajax ×1
architecture ×1
delegates ×1
dto ×1
firefox ×1
javascript ×1
linq-to-xml ×1
regex ×1
vbscript ×1
xpath ×1