[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-572626-105":53,"doc-detail-572626-en":127},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":120,"head_meta":122,"extra_data":124,"updated_unix":126},105,"en","c-cheat-sheet","C# Cheat Sheet","","A concise C# language cheat sheet designed for newcomers, covering core syntax and practical patterns. It explains language basics such as case sensitivity, statement terminators, code blocks, and different comment styles. The guide covers variable declaration and naming rules, arrays, and string handling including concatenation, new lines, and string.Format currency examples. It also provides overviews and syntax examples for conditional statements (if, if-else, switch) and loops (while, for, foreach), plus an advanced section introducing exceptions, methods, and classes.",{"@graph":63,"@context":119},[64,80,102],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/c-cheat-sheet/572626/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/c-cheat-sheet/572626.png","ImageObject",442,249,{"name":88,"@type":89},"asba","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-21","2026-10-13",true,{"@type":98,"interactionType":99,"userInteractionCount":101},"InteractionCounter",{"@type":100},"ViewAction",6,{"@type":103,"mainEntity":104},"FAQPage",[105,111,115],{"name":106,"@type":107,"acceptedAnswer":108},"What are the key syntax rules for C# highlighted in the basics section?","Question",{"text":109,"@type":110},"C# is case-sensitive, statements end with semicolons, code uses braces for blocks, and comments use // for inline, /* */ for block, and /// for XML comments.","Answer",{"name":112,"@type":107,"acceptedAnswer":113},"How does the cheat sheet recommend formatting strings in C#?",{"text":114,"@type":110},"It shows concatenation with the + operator and demonstrates string.Format with an integer format specifier like {0:C} to display a currency symbol based on regional settings.",{"name":116,"@type":107,"acceptedAnswer":117},"Which loop types are covered and when should they be used?",{"text":118,"@type":110},"It covers while (repeat until a condition becomes false), for (specify start/end conditions), and foreach (iterate over elements in a collection such as an array).","https://schema.org",{"og:url":78,"og:type":121,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":123,"canonical":78},"index,follow",{"doc_id":125,"site_id":56},572626,1792360255,{"code":4,"msg":5,"data":128},{"doc_id":125,"user_id":129,"nickname":88,"user_avatar":130,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":131,"file_id":132,"file_url":133,"file_type":134,"file_size":135,"view_count":101,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":136,"language":137,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":138,"faqs":139,"seo_title":140,"seo_description":61,"update_tm":141,"read_time":47},3985747872567,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","© THECODINGGUYS 2013  \nC\\# Cheat Sheet  \n12/24/2013  \nA cheat sheet to the C\\# language, ideal for newcomers to the language for more visit [http://www.thecodingguys.net](http://www.thecodingguys.net)  \nTABLE OF CONTENTS  \nLICENSE 3  \nLANGUAGE BASICS 4  \nIntroduction 4  \nVariables 4  \nSyntax 4  \nNaming Rules 4  \nExample 4  \nArrays 4  \nSyntax 4  \nExample 5  \nStrings 5  \nConcatenation 5  \nExample 5  \nNew Line 5  \nExample 5  \nString.Format 5  \nExample 5  \nCONDITIONAL STATEMENTS 6  \nIf statements 6  \nSyntax 6  \nExample 6  \nIf Else Statements 6  \nExample 6  \nSwitch Statement 6  \nSyntax 7  \nExample 7  \nLOOPS 8  \nWhile Loop 8  \nSyntax 8  \nExample 8  \nFor Loop 8  \nSyntax 8  \nExample 9  \nFor Each 9  \nSyntax 9  \nExample 9  \nADVANCED – EXCEPTIONS, METHODS & CLASSES 10  \nExceptions 10  \nSyntax 10  \nExample 10  \nMethods 10  \nSyntax 10  \nExample 11  \nPassing Parameters 11  \nReturning Data 11  \nClasses 12  \nSyntax 12  \nExample 12  \nSUMMARY 12  \nWhy Not Give us a like? 12  \nLICENSE  \nThis work is licensed under the creative commons Attribution-NonCommercial-NoDerivs 3.0 Unported  \n􀂲 You may not alter, transform, or build upon this work.  \n􀂲 You may not use this work for commercial purposes.  \n􀀹 You are free to copy, distribute and transmit the work  \nLANGUAGE BASICS  \nINTRODUCTION  \nC\\# is a powerful Object Orientated language, for those coming from Java or C++ you should be able to pick up the syntax for C\\# quickly. A few points:  \n􀀹 The language is case-sensitive (So A and a are different)  \n􀀹 Lines terminate with semi-colons  \n􀀹 Code is put in code blocks { }  \n􀀹 Inline comments start with //  \n􀀹 Block comments start with /* */  \n􀀹 XML comments start with ///  \nVARIABLES  \nTo declare a variable you specify the data type and variable name followed by a value.  \nSYNTAX  \nDataType variableName = value;  \nNAMING RULES  \n􀁸 Variables must start with underscore or letter  \n􀁸 Variables cannot contain spaces  \n􀁸 variables can contain numbers  \n􀁸 Cannot contain symbols (accept underscore)  \nEXAMPLE  \nstring Name = \"thecodingguys\" ;  \nint Year = 2013;  \nI will use these two variables throughout.  \nARRAYS  \nArrays are similar to variables, but can hold more than one value.  \nSYNTAX  \nDataType[] ArrayName = { Comma Separated Values } // Array of any size  \nDataType[] ArrayName = new DataType[3] {Command Separated Values } //Expects 3 values  \nEXAMPLE  \nstring[] MyGamesOf2013 = { \"GTAV\" , \"Battlefield3\"};  \nstring[] MyMoveisOf2013 = new string[3] {\"The Amazing Spiderman\" , \"The Expendables 2\" , \"Rise of the planet of the apes\"};  \nSTRINGS  \nCONCATENATION  \nConcatenation is done through the + operator.  \nEXAMPLE  \nConsole .WriteLine(\"Hello \" + \"World\");  \nNEW LINE  \nEXAMPLE  \nConsole .WriteLine(\"Hello \\n\" + \"World\");  \nSTRING. FORMAT  \nFormats an object, you specify the formatting you wish to perform, the following formats an integer and displays the currency symbol.  \nEXAMPLE  \nConsole .WriteLine(string.Format( \"{0:C}\" , 5));  \nDepending on your computers regional settings you will see £5.00 displayed (You’ll see your countries currency symbol) . The 0:C is the formatting we wish to do, in this case it means format the first parameter (0) and show a currency sign.  \nCONDITIONAL STATEMENTS  \nIF STATEMENTS  \nif statement is used to execute code based on a condition the condition must evaluate to true for the code to execute.  \nSYNTAX  \nif (true)  \n{  \n}  \nEXAMPLE  \nif (Year > 2010)  \n{  \nConsole.WriteLine(\"Hello World!\");  \n}  \nIF ELSE STATEMENTS  \nif a condition does not evaluate to true you can use an if else statement to execute other code.  \nEXAMPLE  \nif (Year > 2015)  \n{  \nConsole.WriteLine(\"Hello World!\");  \n}  \nelse  \n{  \nConsole.WriteLine(\"Year is: \" + Year);  \n}  \nSWITCH STATEMENT  \nSimilar to the If else statement, however it has these benefits.  \n􀁸 Much easier to read and maintain  \n􀁸 Much cleaner then using nested if else  \n􀁸 It only evaluates one variable  \nSYNTAX  \nswitch (switch_on)  \n{  \ndefault:  \n}  \nEXAMPLE  \nswitch (Year)  \n{  \ncase 2","cbCaihzYOq6dCj0P","https://ap.wps.com/l/cbCaihzYOq6dCj0P","pdf",649597,13,"English","# TABLE OF CONTENTS\n## LICENSE\n## LANGUAGE BASICS\n## CONDITIONAL STATEMENTS\n## LOOPS\n## ADVANCED – EXCEPTIONS, METHODS & CLASSES\n## SUMMARY","[{\"question\":\"What are the key syntax rules for C# highlighted in the basics section?\",\"answer\":\"C# is case-sensitive, statements end with semicolons, code uses braces for blocks, and comments use // for inline, /* */ for block, and /// for XML comments.\"},{\"question\":\"How does the cheat sheet recommend formatting strings in C#?\",\"answer\":\"It shows concatenation with the + operator and demonstrates string.Format with an integer format specifier like {0:C} to display a currency symbol based on regional settings.\"},{\"question\":\"Which loop types are covered and when should they be used?\",\"answer\":\"It covers while (repeat until a condition becomes false), for (specify start/end conditions), and foreach (iterate over elements in a collection such as an array).\"}]","C# Cheat Sheet | PDF",1791928545]