Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是否需要在使用 HttpWebResponse 类的实例后调用 Close 方法或其他一些清理方法。我没有访问响应流,而只是访问响应的标头和状态代码。
是的。你不知道它的内部结构,这意味着你不知道不丢弃它是安全的。
Yes, it is safe to close it.. scoping it with using clause is the best practice under such circumstances.