C# 中using 用來釋放資源的用法

using(...)html {........}數據庫 定義了一個範圍,等範圍結束之後進行資源的釋放。post 例如:code using(SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=MyTest;User ID=sa;Password=sa")) { conn.open();
相關文章
相關標籤/搜索