File indexing completed on 2025-03-09 03:45:55
0001 <!DOCTYPE html> 0002 <html><head> 0003 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 0004 <title>csharp.cs</title> 0005 <meta name="generator" content="KF5::SyntaxHighlighting - Definition (C#) - Theme (Breeze Dark)"/> 0006 </head><body style="background-color:#232629;color:#cfcfc2"><pre> 0007 <span style="color:#7a7c7d">// this is a single-line comment</span> 0008 <span style="color:#7a7c7d">// </span><span style="color:#81ca2d;background-color:#4d1f24;font-weight:bold">NOTE</span><span style="color:#7a7c7d"> </span><span style="color:#81ca2d;background-color:#4d1f24;font-weight:bold">###</span><span style="color:#7a7c7d"> </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">FIXME</span><span style="color:#7a7c7d"> </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TODO</span> 0009 0010 <span style="color:#7a7c7d">/* this is a</span> 0011 <span style="color:#7a7c7d"> multi-line comment</span> 0012 <span style="color:#7a7c7d">*/</span> 0013 0014 <span style="color:#7a7c7d">/* this is another</span> 0015 <span style="color:#7a7c7d"> * multiline comment</span> 0016 <span style="color:#7a7c7d"> * </span><span style="color:#81ca2d;background-color:#4d1f24;font-weight:bold">NOTE</span><span style="color:#7a7c7d"> </span><span style="color:#81ca2d;background-color:#4d1f24;font-weight:bold">###</span><span style="color:#7a7c7d"> </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">FIXME</span><span style="color:#7a7c7d"> </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TODO</span> 0017 <span style="color:#7a7c7d"> */</span> 0018 0019 <span style="color:#7a7c7d">/** this is another</span> 0020 <span style="color:#7a7c7d"> * multiline comment</span> 0021 <span style="color:#7a7c7d"> * </span><span style="color:#81ca2d;background-color:#4d1f24;font-weight:bold">NOTE</span><span style="color:#7a7c7d"> </span><span style="color:#81ca2d;background-color:#4d1f24;font-weight:bold">###</span><span style="color:#7a7c7d"> </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">FIXME</span><span style="color:#7a7c7d"> </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TODO</span> 0022 <span style="color:#7a7c7d"> */</span> 0023 0024 <span style="color:#7a7c7d">// simple assignment</span> 0025 <span style="color:#2980b9">var</span> i <span style="color:#3f8058">=</span> <span style="color:#f67400">5</span><span style="color:#3f8058">;</span> 0026 0027 <span style="color:#2980b9">var</span> j <span style="color:#3f8058">=</span> <span style="color:#7a7c7d">// assignment missing, still should be nice highlighting</span> 0028 <span style="color:#2980b9">var</span> k <span style="color:#7a7c7d">// assignment missing, still should be nice highlighting</span> 0029 0030 <span style="color:#7a7c7d">// test a string</span> 0031 <span style="color:#2980b9">var</span> s <span style="color:#3f8058">=</span> <span style="color:#f44f4f">"Hello World!"</span><span style="color:#3f8058">;</span> 0032 0033 <span style="color:#7a7c7d">// arr is an array</span> 0034 <span style="color:#2980b9">var</span> arr <span style="color:#3f8058">=</span> <span style="font-weight:bold">new</span><span style="color:#3f8058">[]</span> <span style="color:#3f8058">{</span> <span style="color:#f67400">0</span><span style="color:#3f8058">,</span> <span style="color:#f67400">1</span><span style="color:#3f8058">,</span> <span style="color:#f67400">2</span><span style="color:#3f8058">,</span> <span style="color:#f67400">3</span><span style="color:#3f8058">,</span> <span style="color:#f67400">4</span> <span style="color:#3f8058">};</span> 0035 0036 <span style="color:#7a7c7d">// expr is compiled as IEnumerable<Customer></span> 0037 <span style="color:#7a7c7d">// or perhaps IQueryable<Customer></span> 0038 <span style="color:#2980b9">var</span> expr <span style="color:#3f8058">=</span> 0039 from c <span style="font-weight:bold">in</span> customers 0040 where c<span style="color:#3f8058">.</span><span style="color:#8e44ad">City</span> <span style="color:#3f8058">==</span> <span style="color:#f44f4f">"London"</span> 0041 select c<span style="color:#3f8058">;</span> 0042 0043 <span style="color:#7a7c7d">// compiled anonymous type</span> 0044 <span style="color:#2980b9">var</span> anon <span style="color:#3f8058">=</span> <span style="font-weight:bold">new</span> <span style="color:#3f8058">{</span> Country <span style="color:#3f8058">=</span> <span style="color:#f44f4f">"Germany"</span><span style="color:#3f8058">,</span> Inhabitants <span style="color:#3f8058">=</span> <span style="color:#f67400">80000000</span> <span style="color:#3f8058">};</span> 0045 </pre></body></html>