毕业论文外文翻译-C#.docx

上传人:b****1 文档编号:184905 上传时间:2022-10-05 格式:DOCX 页数:8 大小:16.58KB
下载 相关 举报
毕业论文外文翻译-C#.docx_第1页
第1页 / 共8页
毕业论文外文翻译-C#.docx_第2页
第2页 / 共8页
毕业论文外文翻译-C#.docx_第3页
第3页 / 共8页
毕业论文外文翻译-C#.docx_第4页
第4页 / 共8页
毕业论文外文翻译-C#.docx_第5页
第5页 / 共8页
点击查看更多>>
下载资源
资源描述

毕业论文外文翻译-C#.docx

《毕业论文外文翻译-C#.docx》由会员分享,可在线阅读,更多相关《毕业论文外文翻译-C#.docx(8页珍藏版)》请在冰豆网上搜索。

毕业论文外文翻译-C#.docx

WhereC#FitsIn

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,andthisshowsupinalackofsupportformodemconcepts(suchasUnicodestringsandgeneratingXMLdocumentation),andinsomearchaicsyntaxstructuresdesignedforthecompilersofyesteryear(suchastheseparationofdeclarationfromdefinitionofmemberfunctions).Second,MicrosofthasbeensimultaneouslytryingtoevolveC++intoalanguagethatisdesignedforhigh-performancetasksonWindows,andinordertoachievethatthey'vebeenforcedtoaddahugenumberofMicrosoft-specifickeywordsaswellasvariouslibrariestothelanguage.

TheresultisthatonWindows,thelanguagehasbecomeacompletemess.JustaskC++developershowmanydefinitionsforastringtheycanthinkof:

char*,LPTSTR,string,CString(MFCversion),CString(WTLversion),wchart*,OLECHAR*,andsoon.

Nowenter.NET一acompletelynewenvironmentthatisgoingtoinvolvenewextensionstobothlanguages.MicrosofthasgottenaroundthisbyaddingyetmoreMicrosoft-specifickeywordstoC++,andbycompletelyrevampingVisualBasicintoVisualBasic.NET,alanguagethatretainssomeofthebasicVBsyntaxbutthatissodifferentindesignthatwecanconsiderittobe,forallpracticalpurposes,anewlanguage.IfsinthiscontextthatMicrosofthasdecidedtogivedevelopersanalternative一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.Itsdesignismoreintunewithmodemdevelopertoolsthanbothofthoseotherlanguages,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,markingmethodstobecompiledonlyindebugbuilds).

□ Fullaccesstothe.NETbaseclasslibrary,aswellaseasyaccesstotheWindowsAPI(ifyou

reallyneedit,whichwon9tbeallthatoften).

□ Pointersanddirectmemoryaccessareavailableifrequired,butthelanguagehasbeendesigned

insuchawaythatyoucanworkwithouttheminalmostallcases.

□ SupportforpropertiesandeventsinthestyleofVisualBasic.

□ Justbychangingthecompilerop

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 幼儿教育 > 少儿英语

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1