【正文】
項(xiàng)目。將創(chuàng)建 Class1。在 Class1 的頂部添加以下名稱空間:using 。 Ⅲ 初始化變量的聲明語(yǔ)句添加到 Main 方法。 Ⅳ 直接輸入將類生成的消息指定為 WriteLine 方法的第一個(gè)輸入?yún)?shù)。按 CTRL+ALT+O 組合鍵以確?!拜敵觥贝翱诳梢?jiàn)。(2) 使用 Trace 類還可以使用 Trace 類生成監(jiān)視應(yīng)用程序執(zhí)行的消息。Trace和Debug 類共享大多數(shù)相同的方法來(lái)生成輸出??梢栽谕粦?yīng)用程序中分別或同時(shí)使用 Trace 和Debug 類。在一個(gè)“調(diào)試解決方案配置”項(xiàng)目中,Trace 和 Debug 兩種輸出均為活動(dòng)狀態(tài)。該項(xiàng)目從這兩個(gè)類為 Listener 對(duì)象生成輸出。但是,“發(fā)布解決方案配置”項(xiàng)目?jī)H從Trace 類生成輸出。該“發(fā)布解決方案配置”項(xiàng)目忽略任何 Debug 類方法調(diào)用。 結(jié) 論、支持各種用戶終端的開(kāi)發(fā)平臺(tái)環(huán)境。C語(yǔ)言是一種現(xiàn)代的面向?qū)ο蟮某绦蜷_(kāi)發(fā)語(yǔ)言,。.NET平臺(tái)提供了大量的工具和服務(wù),能夠最大限度地發(fā)掘和使用計(jì)算機(jī)能力。語(yǔ)言可以發(fā)開(kāi)出各種Windows應(yīng)用程序和控制臺(tái)程序,而且使用方便,在C.NET環(huán)境下使用工具箱中的各種組件,對(duì)組件進(jìn)行編程即可實(shí)現(xiàn)所需的功能。在串口通信方面,C與VB大不相同,相比之下,運(yùn)用C更具挑戰(zhàn)性,因?yàn)樗惶峁┐诳丶?必須使用SerialPort類,在熟悉串口通信技術(shù)及協(xié)議后進(jìn)行編程。利用RS232可以實(shí)現(xiàn)單片機(jī)與PC機(jī)之間的通信,數(shù)據(jù)的接收和反饋。數(shù)據(jù)可以顯示在用C語(yǔ)言開(kāi)發(fā)的界面上,并且通過(guò)與數(shù)據(jù)庫(kù)的連接,讓數(shù)據(jù)自發(fā)保存在數(shù)據(jù)庫(kù)中,供用戶進(jìn)行插入、修改、刪除等操作。而且,通過(guò)訪問(wèn)XML技術(shù),還可以使數(shù)據(jù)自動(dòng)生成XML文檔保存等。用C語(yǔ)言設(shè)計(jì)的組件能夠用于Web服務(wù),通過(guò)Internet,可以被運(yùn)行于任何操作系統(tǒng)上任何編程語(yǔ)言所調(diào)用。因?yàn)镃,。其固有的特性保證了它是一種高效、安全、靈活的現(xiàn)代程序設(shè)計(jì)語(yǔ)言,所以從最普通的應(yīng)用到大規(guī)模的技術(shù)開(kāi)發(fā),C。總結(jié)與體會(huì)通過(guò)這半年時(shí)間的不懈努力,終于完成了畢業(yè)設(shè)計(jì)。從選題到搜集資料,再到親自動(dòng)手設(shè)計(jì)制作,雖然花費(fèi)了大量的時(shí)間和精力,但是也從中學(xué)到了不少的東西。C.NET語(yǔ)言是一門新的編程語(yǔ)言,是一個(gè)全新的領(lǐng)域,對(duì)于一個(gè)編程方面比較弱的人來(lái)說(shuō)無(wú)疑會(huì)感到困難和茫然。一開(kāi)始著手查閱資料的時(shí)候,覺(jué)得很陌生,因?yàn)橹暗膶W(xué)習(xí)中沒(méi)有涉及到,而且想在短短3個(gè)月內(nèi)精通一門編程語(yǔ)言不是一件輕松的事,不過(guò),在老師的鼓勵(lì)和幫助下,我決定好好學(xué)習(xí)C語(yǔ)言,鍛煉自己的毅力。三個(gè)多月以來(lái),遇到的問(wèn)題到是不少。特別是在調(diào)試環(huán)節(jié),每當(dāng)出現(xiàn)的結(jié)果和預(yù)想的不一樣或沒(méi)有達(dá)到預(yù)期的效果時(shí),就必需不斷地調(diào)試,一步一步的來(lái),說(shuō)起來(lái)容易,做起來(lái)不是那么輕松。有時(shí)我也想停下,但還是堅(jiān)持下來(lái)了。 當(dāng)出現(xiàn)問(wèn)題時(shí)調(diào)試很多遍都沒(méi)有解決時(shí),就停下來(lái),冷靜的分析一下,逐個(gè)調(diào)試可能出現(xiàn)的錯(cuò)誤,直到出現(xiàn)自己滿意的結(jié)果。雖然過(guò)程很難堅(jiān)持下來(lái),但是當(dāng)整個(gè)畢業(yè)設(shè)計(jì)完成時(shí),自己會(huì)得到極大的鼓勵(lì)和滿足感。這次畢業(yè)設(shè)計(jì)也暴露出自己在專業(yè)知識(shí)方面的很多不足之處,尤其是編程能力比較薄弱。這次實(shí)踐是對(duì)自己大學(xué)四年所學(xué)知識(shí)的一次大檢閱,讓我明白自己懂的知識(shí)還很淺薄,雖然馬上要畢業(yè)了,但是求學(xué)之路還很長(zhǎng),在以后工作中還應(yīng)該努力學(xué)習(xí),不斷的完善自己,爭(zhēng)取使自己成為一個(gè)對(duì)社會(huì)有所貢獻(xiàn)的人。 謝 辭在本次論文完成過(guò)程中,我得到很多老師和同學(xué)的幫助。首先,我要感謝我的導(dǎo)師—張果老師。從課題的選擇到論文的最終完成,張老師始終給予我細(xì)心的指導(dǎo)和不懈的支持。在遇到困難的時(shí)候,我手足無(wú)措,曾想到放棄繼續(xù)求知,當(dāng)張老師得知我的想法,不僅沒(méi)有責(zé)怪我,反而鼓勵(lì)我說(shuō)編程是個(gè)痛苦的過(guò)程,但是當(dāng)你設(shè)計(jì)完成的時(shí)候,將會(huì)得到無(wú)比的喜悅和收獲,尤其在困難面前不能低頭,應(yīng)該重拾信心。正是張老師的悉心教導(dǎo),讓我有了勇氣面對(duì)設(shè)計(jì)過(guò)程中的種種困難。張老師不僅對(duì)我本次設(shè)計(jì)的完成有莫大的幫助,更重要的是您從教會(huì)了我正確對(duì)待學(xué)習(xí)的態(tài)度,凡是都要對(duì)自己有信心,因?yàn)樽孕攀浅晒Φ拈_(kāi)端。另外,從張老師身上,我學(xué)會(huì)了嚴(yán)肅的科學(xué)態(tài)度,嚴(yán)謹(jǐn)?shù)闹螌W(xué)精神,精益求精的工作作風(fēng),這些都深深地感染和激勵(lì)著我。人應(yīng)該不斷的完善自己,而不能追求原地踏步。我人生的角色即將轉(zhuǎn)換,我該走出校園了,在這轉(zhuǎn)變發(fā)生之前我有張老師給我的如此多的指導(dǎo),使我在面對(duì)以后的工作和生活有可以借鑒的資本。在此,我要真誠(chéng)的說(shuō)聲:“謝謝您,張老師!”其次我要感謝本次畢業(yè)設(shè)計(jì)小組的所有同學(xué),謝謝你們一直的支持和鼓勵(lì),雖然相處的時(shí)間不長(zhǎng),但是我們已經(jīng)成為學(xué)習(xí)上的知己,無(wú)論在今后的學(xué)習(xí)還是工作中,希望我們能一起繼續(xù)努力,實(shí)現(xiàn)自己心中的理想。最后,要感謝我的父母,謝謝您們這么多年來(lái)的愛(ài)護(hù)和支持,有您們的陪伴,我會(huì)更加努力的。現(xiàn)在即將揮別我的學(xué)校、老師、同學(xué)還有我四年的大學(xué)生活,雖然依依不舍,但是還是對(duì)前面的路充滿信心,只想說(shuō)感謝我的學(xué)校和老師,有你們的教誨伴隨我,今后,我會(huì)繼續(xù)努力,好好工作!好好學(xué)習(xí)!好好生活! 參考文獻(xiàn)[1]. Maiani B,Still J著 ,康博譯 .Visual C.:清華大學(xué)出版社,—27.[2].鄭小平. Visual C.:人民郵電出版社,2001.[3].Glenn ,2006.[4].:高等教育出版社,2004.[5].:中國(guó)輕工業(yè)出版社,1999.[6].Jason Price. C:電子工業(yè)出版社,2003.[7].Mickey Williams. Visual C.:清華大學(xué)出版社,2003,3.[8].:清華大學(xué)出版社,1997.[9].:科學(xué)出版社,2000.[10].:清華大學(xué)出版社,1999.[11].曹祖圣等. Visual C.:科學(xué)出版社,2004.[12].張立等. C:機(jī)械工業(yè)出版社,.[13].施燕妹等. C:中國(guó)水利水電出版社,.[14].:人民郵電出版社,2001.[15].. Microsoft .NET Framework Delivers the Platform an Integrated, ServiceOriented Magazine,.[16].. C and the .NET Platform, Apress, Berkeley, 2001.附錄一:翻譯英文部分本文引自網(wǎng)站Modeling C applications using Rational Modeling Extension for .NET ABSTRACT Learn how to model C applications by using IBM Rational Modeling Extension for .NET, which is available in IBM Rational Software Modeler, Rational Systems Developer, and Rational Software Architect. This article describes how to model various C constructs, and the author assumes that you are familiar with basic UML modeling concepts and using Rational modeling tools. IBM Rational Modeling Extension for enables .NET application developers to use Rational modeling tools in designing extension is available in IBM Rational Software Modeler, IBM Rational Systems Developer, and IBM Rational Software Architect, and it includes support for modeling C applications. Key Words: Structure。Extentsion。Modeling。TextIf you have knew about modeling simple C applications by using the C profile and type library provided by Rational Modeling Extension for . Therefore, you should now be familiar with modeling C classes, structures, interfaces, delegates, enumerations, fields, and methods. This article like to use the same example of the graphics library project used as mon to help you understand how to model other C concepts, such as indexers, properties, operators, and others. This part builds on the previous article by describing how to use this extension to model these constructs: Constructors and destructors 。 Operators 。 Properties 。 Indexers。 Events 。 Attributes。 Namespace 。This article also explains how to validate your model for C applications.Part 1. Modeling constructors and destructors Like C methods, a constructor or destructor is also modeled as a UML operation with optional an CSharp Method stereotype for specific modifiers (for example, extern). A UML operation representing a constructor is given the same name as its parent class or structure name. A destructor is named in a similar manner, except that it has a ~ (tilde) followed by the model’s name. A return type should not be set for a UML operation representing either a constructor or a destructor. Parameters are added to the constructor similarly to how you add parameters to method. A static constructor is modeled by setting the static property of the corresponding UML operation.Figure 1 shows a constructor with two arguments of type Point and a destructor modeled for the DrawingSurface class of the sample application used here for illustration purposes. Figure 1. C constructor DrawingSurface(Point start,Point end) and destructor DrawingSurface().Part operatorsC operators are modeled as UML operation with optional CSharp Method stereotype for specific modifiers, such as extern. A unary operator is named by using the key word operator followed by the unary operator symbol. For example, the unary increment operator is named as operator ++. A return type and a single parameter are set for UML operation that represents a unary operator. A UML operation representing a binary operator is named similarly to unary operator, but the symbol is one of the binary operators. Also, two paramet