c#外文文献以及翻译Word格式.docx
- 文档编号:15064912
- 上传时间:2022-10-27
- 格式:DOCX
- 页数:5
- 大小:19.48KB
c#外文文献以及翻译Word格式.docx
《c#外文文献以及翻译Word格式.docx》由会员分享,可在线阅读,更多相关《c#外文文献以及翻译Word格式.docx(5页珍藏版)》请在冰豆网上搜索。
Inonesense,C#canbeseenasbeingthesamethingtoprogramminglanguagesas.NETistotheWindowsenvironment.JustasMicrosofthasbeenaddingmoreandmorefeaturestoWindowsandtheWindowsAPIoverthepastdecade,VisualBasicandC++haveundergoneexpansion.AlthoughVisualBasicandC++haveendedupashugelypowerfullanguagesasaresultofthis,bothlanguagesalsosufferfromproblemsduetothelegaciesofhowtheyhaveevolved.
InthecaseofVisualBasic6andearlier,themainstrengthofthelanguagewasthefactthatitwassimpletounderstandanddidn’tmakemanyprogrammingtaskseasy,largelyhidingthedetailsoftheWindowsAPIandtheCOMcomponentinfrastructurefromthedeveloper.ThedownsidetothiswasthatVisualBasicwasnevertrulyobject-oriented,sothatlargeapplicationsquicklybecomedisorganizedandhardtomaintain.Aswellasthis,becauseVisualBasic’ssyntaxwasinheritedfromearlyversionsofBASIC(which,inturn,wasdesignedtobeintuitivelysimpleforbeginningprogrammerstounderstand,ratherthantowritelargecommercialapplications),itdidn’treallylenditselftowell-structuredorobject-orientedprograms.
C++,ontheotherhand,hasitsrootsintheANSIC++languagedefinition.Itisn’tcompletelyANSIcompliantforthesimplereasonthatMicrosoftfirstwroteitsC++compilerbeforetheANSIdefinitionhadbecomeofficial,butitcomesclose.Unfortunately,thishasledtotwoproblems.First,ANSIC++hasitsrootsinadecade-oldstateoftechnology,andthisshowsupinalackofsupportformodernconcepts(suchasUnicodestringsandgeneratingXMLdocumentation),andinsomearchaicsyntaxstructuresdesignedforthecompilersofyesteryear(suchastheseparationofdeclarationfromdefinitionofmemberfunctions).Second,MicrosofthasbeensimultaneouslytryingtoevolveC++intoalanguagethatisdesignedforhigh-performancetasksonWindows,andinordertoachievethatthey’vebeenforcedtoaddahugenumberofMicrosoft-specifickeywordsaswellasvariouslibrariestothelanguage.
TheresultisthatonWindows,thelanguagehasbecomeacompletemess.JustaskC++developershowmanydefinitionsforastringtheycanthinkof:
char*,LPTSTR,string,CString(MFCversion),CString(WTLversion),wchar_t*,OLECHAR*,andsoon.
Nowenter.NET—acompletelynewenvironmentthatisgoingtoinvolvenewextensionstobothlanguages.MicrosofthasgottenaroundthisbyaddingyetmoreMicrosoft-specifickeywordstoC++,andbycompletelyrevampingVisualBasicintoVisualBasic.NET,alanguagethatretainssomeofthebasicVBsyntaxbutthatissodifferentindesignthatwecanconsiderittobe,forallpracticalpurposes,anew
language.It’sinthiscontextthatMicrosofthasdecidedtogivedevelopersanalternative—alanguagedesignedspecificallyfor.NET,anddesignedwithacleanslate.VisualC#.NETistheresult.Officially,MicrosoftdescribesC#asa“simple,modern,object-oriented,andtype-safeprogramminglanguagederivedfrom
CandC++.〞Mostindependentobserverswouldprobablychangethatto“derivedfromC,C++,andJava.〞Suchdescriptionsaretechnicallyaccuratebutdolittletoconveythebeautyoreleganceofthelanguage.Syntactically,C#isverysimilartobothC++andJava,tosuchanextentthatmanykeywordsarethesame,andC#alsosharesthesameblockstructurewithbraces({})tomarkblocksofcode,andsemicolonstoseparatestatements.ThefirstimpressionofapieceofC#codeisthatitlooksquitelikeC++orJavacode.Behindthatinitialsimilarity,however,C#isaloteasiertolearnthanC++,andofcomparabledifficultytoJava.Itsdesignismoreintunewithmoderndevelopertoolsthanbothofthoseotherlanguages,andithasbeendesignedtogiveus,simultaneously,theeaseofuseofVisualBasic,andthehighperformance,low-levelmemoryaccessofC++ifrequired.SomeofthefeaturesofC#are:
❑Fullsupportforclassesandobject-orientedprogramming,includingbothinterfaceandimplementation
inheritance,virtualfunctions,andoperatoroverloading.
❑Aconsistentandwell-definedsetofbasictypes.
❑Built-insupportforautomaticgenerationofXMLdocumentation.
❑Automaticcleanupofdynamicallyallocatedmemory.
❑Thefacilitytomarkclassesormethodswithuser-definedattributes.Thiscanbeusefulfordocumentation
andcanhavesomeeffectsoncompilation(forexample,markingmethodstobe
compiledonlyindebugbuilds).
❑Fullaccesstothe.NETbaseclasslibrary,aswellaseasyaccesstotheWindowsAPI(ifyou
reallyneedit,whichwon’tbeallthatoften).
❑Pointersanddirectmemoryaccessareavailableifrequired,butthelanguagehasbeendesigned
insuchawaythatyoucanworkwithouttheminalmostallcases.
❑SupportforpropertiesandeventsinthestyleofVisualBasic.
❑Justbychangingthecompileroptions,youcancompileeit
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- c# 外文 文献 以及 翻译
![提示](https://static.bdocx.com/images/bang_tan.gif)