using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Threading;namespace WindowsFormsApplication2{ public part
private string getString(string strSource, out int intStrLength,params string[] adds) { //add other stings to strSource , and return , at the same time //we return length of string strSource by keyword out int
跨線程調用表單控制項 使用者不喜歡反應慢的程式。在執行耗時較長的操作時,使用多線程是明智之舉,它可以提高程式 UI 的響應速度,使得一切運行顯得更為快速。在 Windows 中進行多線程編程曾經是 C++ 開發人員的專屬特權,但是現在,可以使用所有相容 Microsoft .NET 的語言來編寫。不過Windows 表單體繫結構對線程使用制定了嚴格的規則。如果只是編寫單線程應用程式,則沒必要知道這些規則,這是因為單線程的代碼不可能違反這些規則。然而,一旦採用多線程,就需要理解 Windows
C語言是沒有字串類型的,一般通過字元指標或者字元數組進行操作。指標和數組的差別這裡就不講了。 首先說明下程式中變數在記憶體中的分布。 全域變數儲存在資料區段中,局部變數儲存在堆棧中,利用malloc動態分配的變數儲存在堆中。堆棧和堆的區別請google. 下面根據一個具體的程式來看。 代碼Code highlighting produced by Actipro CodeHighlighter
我們在做程式開發時,難免會遇到錯誤異常。如何快速地找到出錯的地方、分析錯誤的原因以及找到問題的解決方案,是許多初級程式員困擾的問題,這也正是經驗的寶貴之處。下面我將簡單介紹在Visual Studio中調試以及一些進階的調試和常見的錯誤。PS:如無特別說明Visual Studio均指Dev10即Visual Studio 2010。入門篇假設你是有著.Net平台的程式員,並且使用Visual Studio
預存程序 create proc test@lc_code varchar(50)asselect lc_name from lc_location where lc_code=@lc_codeDataSetSqlConnection conn = new SqlConnection("Server=dserver;database=lawmanfepos;uid=sa;pwd="); SqlDataAdapter sar = new