A survey of garbage collection and the changes CLR 4.0 brings in - series of what is new in CLR 4.0 導言Introduction 記憶體回收(Garbage Collection)在.net中是一個很重要的機制. 本文將要談到CLR4.0對記憶體回收做了哪些改進. 為了更好地理解這些改進, 本文也要介紹記憶體回收的曆史. 這樣我們對整個記憶體回收有一個大的印象.
A survey of garbage collection and the changes CLR 4.0 brings in Part 2 - series of what is new in CLR 4.0 接前篇Continue the previous post .net CLR 4.0對記憶體回收機制的改進CLR4.0所帶來的變化仍然沒有在這篇,請看下篇。記憶體釋放和壓縮建立對象引用圖之後,記憶體回收行程將那些沒有在這個圖中的對象(即不再需要的對象)釋放。釋放記憶體之後,
接上文講,我們在上篇文章裡經常提到兩個東西(Linq系列:基礎與本質(Part I)),System.Linq.Enumerable和 System.Func。那麼著兩個東東到底是個什麼東西呢?我們看看下面的代碼:LINQ運算式在編譯時間,編譯器會將查詢操作符轉換為對 System.Linq.Enumerable 類型中若干函數的調用(或者其他類型)。下面是幾個Enumerable 成員函數:CodeCode highlighting produced by Actipro
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[p_search]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[p_search] GO /*--在整個資料庫搜尋某個字串在哪個表的哪個欄位中 /*
因為WPF項目需要,經常要對DataTable 的操作及復原,因操作存在於多個視窗及方法間,不適用TransactionScope。於是想到DataTable的Merge操作。1):首先建立一個DataTable以便測試Code highlighting produced by Actipro CodeHighlighter
重複資料刪除記錄,將TABLE_NAME中的不重複記錄儲存到#TABLE_NAME中 select distinct * into #table_name from table_name delete from table_name select * into table_name from #table_name drop table #table_name 與此相關的是“select into”選項,可以在資料庫屬性 對話方塊中,勾起來此項,或者在Query Analyzer中執行
declare @row varchar(30)declare @tbname varchar(30) DECLARE string_find_cursor CURSOR FAST_FORWARD FOR SELECT [name] FROM sysobjects where type='U' and name like 'A%' ORDER BY [name] OPEN string_find_cursor