版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、畢業(yè)設(shè)計外 文 文 獻 翻 譯院 系 計算機與電子系 專 業(yè) 班 級 姓 名 原 文 出 處 Illustrated C# 2008 評 分 指 導 教 師 陳頡 華中科技大學武昌分校2012年03月01日畢業(yè)設(shè)計/論文外文文獻翻譯要求:1外文文獻翻譯的內(nèi)容應與畢業(yè)設(shè)計/論文課題相關(guān)。2外文文獻翻譯的字數(shù):非英語專業(yè)學生應完成與畢業(yè)設(shè)計/論文課題內(nèi)容相關(guān)的不少于2000漢字的外文文獻翻譯任務(其中,漢語言文學專業(yè)、藝術(shù)類專業(yè)不作要求),英語專業(yè)學生應完成不少于2000漢字的二外文獻翻譯任務。格式按華中科技大學武昌分校本科畢業(yè)設(shè)計/論文撰寫規(guī)范的要求撰寫。3外文文獻翻譯附于開題報告之后:第一部分
2、為譯文,第二部分為外文文獻原文,譯文與原文均需單獨編制頁碼(底端居中)并注明出處。本附件為封面,封面上不得出現(xiàn)頁碼。4外文文獻翻譯原文由指導教師指定,同一指導教師指導的學生不得選用相同的外文原文。C# and the .NET FrameworkThe C# programming language was designed for developing programs for Microsofts .NET Framework. This chapter will take a brief look at where .NET came from, and its basic archit
3、ecture. Just to make sure youre starting on the right foot, let me take this opportunity to remind you of what is hopefully the obvious: C# sharp is pronounced see sharp.In the late 1990s, Windows programming using the Microsoft platform had fractured into a number of branches. Most programmers were
4、 using Visual Basic (VB), C, or C+. Some C and C+ programmers were using the raw Win32 API, but most were using the Microsoft Foundation Classes (MFC). Others had moved to the Component Object Model (COM).All these technologies had their own problems. The raw Win32 API was not object-oriented, and u
5、sing it required a lot more work than MFC. MFC was object-oriented, but was inconsistent and getting old. COM, although conceptually simple, was complex in its actual coding, and required lots of ugly, inelegant plumbing.Another shortcoming of all these programming technologies was that they were ai
6、med primarily at developing code for the desktop rather than the Internet. At the time, programming for the Web was an afterthought and seemed very different from coding for the desktop.What we really needed was a new startan integrated, object-oriented development framework that would bring consist
7、ency and elegance back to programming. To meet this need, Microsoft set out to develop a code execution environment and a code development environment that met these goals.In 2002, Microsoft released the .NET Framework, which promised to address the old problems and meet the goals for the next-gener
8、ation system. The .NET Framework is a much more consistent and object-oriented environment than either the MFC or COM programming technologies. Some of its features include the following:n Multiple platforms: The system runs on a broad range of computers, from servers and desktop machines to PDAs an
9、d cell phones.n Industry standards: The system uses industry standard communication protocols, such as XML, HTTP, SOAP, and WSDL.n Security: The system can provide a much safer execution environment, even in the presence of code obtained from suspect sources.The .NET Framework is made up of three co
10、mponents. The execution environment is called the Common Language Runtime (CLR). The CLR manages program execution at run time, including the following:n Memory managementn Code safety verificationn Code executionn Garbage collectionThe programming tools include everything you need for coding and de
11、bugging, including the following:n The Visual Studio integrated development environmentn .NET-compliant compilers (e.g., C#, VB, JScript, and managed C+)n Debuggersn Server-side improvements, such as ASP.NETThe Base Class Library (BCL) is a large class library used by the .NET Framework and availabl
12、e for you to use in your programs as well.The .NET Framework offers programmers considerable improvements over previous Windows programming environments. A brief overview of its features and their benefits is given in the following sections.Object-Oriented Development EnvironmentThe CLR, the BCL, an
13、d C# are designed to be thoroughly object-oriented and act as a wellintegrated environment.The system provides a consistent, object-oriented model of programming for both local programs and distributed systems. It also provides a software development interface for desktop application programming, mo
14、bile application programming, and web development, consistent across a broad range of targets, from servers to cell phones.Automatic Garbage CollectionThe CLR has a service called the Garbage Collector (GC), which automatically manages memory for you.n The GC automatically deletes objects from memor
15、y that your program will no longer access.n The GC relieves the programmer of tasks that he or she has traditionally had to perform, such as deallocating memory and hunting for memory leaks. This is no small feature, since hunting for memory leaks can be difficult and time-consuming.Interoperability
16、The .NET Framework was designed for interoperability between different .NET languages, the operating system or Win32 DLLs, and COM.n .NET language interoperability allows software modules written using different .NET languages to interact seamlessly.A program written in one .NET language can use and
17、 even inherit from a class written in another .NET language, as long as certain rules are followed.Because of its ability to easily integrate modules produced in different programming languages, the .NET Framework is sometimes described as language agnostic.n .NET provides a feature called platform
18、invoke (P/Invoke), which allows code written for.NET to call and use code not written for .NET but exported as raw C functions by standard Win32 DLLs, such as the Windows APIs.n The .NET Framework also allows interoperability with COM. .NET software components can call COM components and COM compone
19、nts can call .NET components as if they were COM components themselves.No COM RequiredThe .NET Framework frees the programmer from the COM legacy. As a C# programmer, you do not need to use COM, and therefore do not need any of the following:n The IUnknowninterface: In COM, all objects must implemen
20、t interface IUnknown. In con-trast, all .NET objects derive from a single class called object. Interface programming is still an important part of .NET, but it is no longer the central theme.n Type libraries: In COM, type information is kept in type libraries as .tlb files, which areseparate from th
21、e executable code. In .NET, a programs type information is kept together with the code in the program file.n Reference counting: In COM, the programmer must keep track of the number of refer-ences to an object to make sure it is not deleted at the wrong time. In .NET, the GC keeps track of reference
22、s and deletes objects only when appropriate.n HRESULT: COM uses the HRESULT data type to return runtime error codes. .NET does not use HRESULTs. Instead, all unexpected runtime errors produce exceptions.n The registry: COM applications must be registered in the system registry, which holds informati
23、on about the configurations of the operating system and applications. .NET applications do not use the registrysimplifying the installation and removal of programs. Simplified DeploymentDeploying programs written for the .NET Framework can be much easier than it was before, for the following reasons
24、:n The fact that .NET programs dont need to be registered with the registry means that inthe simplest case, a program just needs to be copied to the target machine and its ready to run.n .NET offers a feature called side-by-side execution, which allows different versions of a DLL to exist on the sam
25、e machine. This means that every executable can have access to the version of the DLL for which it was built.Type SafetyThe CLR checks and ensures the type safety of parameters and other data objectseven between components written in different programming languages.The Base Class LibraryThe .NET Fra
26、mework supplies an extensive base class library, called, not surprisingly, the Base Class Library (BCL). (It is also sometimes called the Framework Class LibraryFCL). You can use this extensive set of available code when writing your own programs. Some of the categories are the following:n General b
27、ase classes: Classes that provide you with an extremely powerful set of tools fora wide range of programming tasks, such as string manipulation, security, and encryption n Collection classes: Classes that implement lists, dictionaries, hash tables, and bit arraysn Threading and synchronization class
28、es: Classes for building multithreaded programsn XML classes: Classes for creating, reading, and manipulating XML documentsC#和.NET框架C#編程語言是為開發(fā)微軟公司的.NET框架上的程序而設(shè)計的。本章將簡要介紹.NET從何而來,以及它的基本架構(gòu)。這只是為了確保你從正確的一步開始,讓我借此機會提醒你一件可能顯而易見的事情:C#的發(fā)音為see sharp。在20世紀90年代后期,使用微軟平臺的Windows編程分化成許多分支。大多數(shù)程序員在使用Visual Basic (
29、VB)、C或C+。一些C和CH程序員在使用純Win32 API,但大多數(shù)人在使用MFC(Microsoft Foundation Classes,微軟基礎(chǔ)類庫)。其他人已經(jīng)轉(zhuǎn)向了COM (Component Object Model,組件對象模型)。所有的這些技術(shù)都有自己的問題。純Win32 API不是面向?qū)ο蟮模沂褂盟墓ぷ髁勘萂FC的更大。MFC是面向?qū)ο蟮?,但是它不一致,并逐漸變得陳舊。COM雖然概念上簡單,但它的實際代碼復雜,并且需要很多丑陋的、不雅的底層基礎(chǔ)代碼。所有這些編程技術(shù)的另外一個缺點是它們主要針對桌面程序而不是Internet的開發(fā)。那時,Web編程還是以后的事情,而且
30、看起來和桌面編程非常不同。我們真正需要的是一個新的開始個集成的、面向?qū)ο蟮拈_發(fā)框架,它可以把一致和優(yōu)雅帶回編程。為滿足這個需求,微軟宣布開發(fā)一個代碼執(zhí)行環(huán)境和一個可以實現(xiàn)這些目標的代碼開發(fā)環(huán)境。在2002年,微軟發(fā)布了.NET框架,聲稱其解決了舊問題并實現(xiàn)了下一代系統(tǒng)的目標。.NET框架是一種比MFC或COM編程技術(shù)更一致并面向?qū)ο蟮沫h(huán)境。它的特點包括以下幾點。n 多平臺:該系統(tǒng)可以在廣泛的計算機上運行,包括從服務器、桌面機到PDA和移動 。n 行業(yè)標準:該系統(tǒng)使用行業(yè)標準的通信協(xié)議,比如XML、HTTP、SOAP和WSDL。n 安全性:該系統(tǒng)能提供更加安全的執(zhí)行環(huán)境,即使有來源可疑的代碼存在
31、。 .NET框架由三部分組成執(zhí)行環(huán)境稱為CLR(Common Language Runtime,公共語言運行庫)。CLR在運行期管理程序的執(zhí)行,包括以下內(nèi)容。n 內(nèi)存管理n 代碼安全驗證n 代碼執(zhí)行n 垃圾收集 編程工具涵蓋了編碼和調(diào)試需要的一切,包括:n .NET兼容的編譯器(例如:C#、VB、JScript和托管的C+)n 調(diào)試器n 服務器端改進,比如ASP.NETBCL(Base Class Library基類庫)是.NET框架使用的一個大的類庫,而且也可以在你的程序中使用。較之以前的Windows編程環(huán)境,.NET框架為程序員帶來了相當大的改進。下面的幾節(jié)將簡要闡述它的特點及其帶來的好
32、處。面向?qū)ο蟮拈_發(fā)環(huán)境CLR、BCL和C#被設(shè)計得完全面向?qū)ο螅⑿纬闪己玫募森h(huán)境。系統(tǒng)為本地程序和分布式系統(tǒng)都提供了一致的、面向?qū)ο蟮木幊棠P?。它還為桌面應用程序、移動應用程序和Web開發(fā)提供了軟件開發(fā)接口,涉及的對象范圍很廣,從計算機服務器到手機。自動垃圾收集CLR有一項服務稱為GC(Garbage Collector,垃圾收集),它能為你自動管理內(nèi)存。n GC自動從內(nèi)存中刪除程序不再訪問的對象。n GC使程序員不再操心許多以前必須執(zhí)行的任務,比如釋放內(nèi)存和檢查內(nèi)存泄漏。這可不是個小特性,因為檢查內(nèi)存泄漏可能非常困難而且耗時。互操作性.NET框架的設(shè)計專門考慮了不同的.NET語言、操作系統(tǒng)或Win32 DLL
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度社保工傷保險合同范本(含企業(yè)員工福利政策)3篇
- 二零二五年度企業(yè)人才招聘與培養(yǎng)合同3篇
- 二零二五年度國際知識產(chǎn)權(quán)授權(quán)合同與實施標準3篇
- 2025年度數(shù)據(jù)安全防護與應急預案制定合同3篇
- 蘇州校本課程設(shè)計
- 二零二五年度幼兒園教育設(shè)施建設(shè)與房地產(chǎn)開發(fā)合同3篇
- 海南職業(yè)技術(shù)學院《全科醫(yī)學概論A》2023-2024學年第一學期期末試卷
- 旋轉(zhuǎn)洗瓶機課程設(shè)計
- 海南衛(wèi)生健康職業(yè)學院《智能交通系統(tǒng)》2023-2024學年第一學期期末試卷
- 海南外國語職業(yè)學院《食品工廠機械與設(shè)備A》2023-2024學年第一學期期末試卷
- 行政個人年終述職報告
- 《發(fā)電廠電氣部分》考試題庫
- 建筑施工安全生產(chǎn)包保責任實施方案
- 《上帝擲骰子嗎:量子物理史話》導讀學習通超星期末考試答案章節(jié)答案2024年
- 直播電商年終總結(jié)
- PAS 2050:2011-商品和服務在生命周期內(nèi)的溫室氣體排放評價規(guī)范(英文)
- 空調(diào)供貨方案
- 2024年初一英語閱讀理解專項練習及答案
- 幕墻作業(yè)安全技術(shù)交底
- 《建筑工程設(shè)計文件編制深度規(guī)定》(2022年版)
- 病例報告表(CRF)模板
評論
0/150
提交評論