|
8 | 8 | <h1>@ViewData["Title"]</h1> |
9 | 9 | <hr class="divider-light-blue" /> |
10 | 10 |
|
| 11 | + <div class="mb-4"> |
| 12 | + <h2 class="fs-4 heading-wrapper" id="naming-conventions-table"> |
| 13 | + C# Naming Conventions - Quick Reference Table |
| 14 | + <button class="anchor-link" v-on:click="copyToClipboard('naming-conventions-table')" title="Copy direct link"> |
| 15 | + <i class="fa-solid fa-link"></i> |
| 16 | + </button> |
| 17 | + </h2> |
| 18 | + <div class="table-responsive mb-3"> |
| 19 | + <table class="table table-bordered table-striped align-middle w-auto"> |
| 20 | + <thead> |
| 21 | + <tr> |
| 22 | + <th>Kind</th> |
| 23 | + <th>Naming Convention</th> |
| 24 | + <th>Example</th> |
| 25 | + </tr> |
| 26 | + </thead> |
| 27 | + <tbody> |
| 28 | + <tr><td>Classes</td><td>PascalCase</td><td><code>class Car</code></td></tr> |
| 29 | + <tr><td>Types and Namespaces</td><td>PascalCase</td><td><code>namespace VehicleManufacturer;</code></td></tr> |
| 30 | + <tr><td>Parameters</td><td>camelCase</td><td><code>public Car(int odometerMileage, string manufacturer)</code></td></tr> |
| 31 | + <tr><td>Methods</td><td>PascalCase</td><td><code>public void StartEngine()</code></td></tr> |
| 32 | + <tr><td>Properties</td><td>PascalCase</td><td><code>public double FuelLevel { get; set; }</code></td></tr> |
| 33 | + <tr><td>Local Variables</td><td>camelCase</td><td><code>int yearManufactured;</code></td></tr> |
| 34 | + <tr><td>Local Functions</td><td>PascalCase</td><td><code>string CalculateMilesUntilEmpty(double fuelLevel)</code></td></tr> |
| 35 | + <tr><td>Fields</td><td>_PascalCase</td><td><code>private string _Day;</code></td></tr> |
| 36 | + <tr><td>Enum Members</td><td>PascalCase</td><td><code>enum Status { Unknown, Operational, Broken, InShop }</code></td></tr> |
| 37 | + <tr><td>Type Parameters</td><td>TPascalCase</td><td><code>public TOutput Convert<TInput, TOutput>(TInput from)</code></td></tr> |
| 38 | + <tr><td>Interfaces</td><td>IPascalCase</td><td><code>interface ISampleInterface</code></td></tr> |
| 39 | + </tbody> |
| 40 | + </table> |
| 41 | + </div> |
| 42 | + </div> |
| 43 | + |
11 | 44 | <div> |
12 | 45 | @foreach (var group in guidelines.GroupBy(g => g.SanitizedSubsection).OrderBy(g => g.Key)) |
13 | 46 | { |
14 | | - <h2 class="fs-4" id="@group.Key?.ToLower()">@group.Key</h2> |
| 47 | + <h2 class="fs-4 heading-wrapper" id="@group.Key?.ToLower()"> |
| 48 | + @group.Key |
| 49 | + <button class="anchor-link" v-on:click="copyToClipboard('@group.Key?.ToLower()')"> |
| 50 | + <i class="fa-solid fa-link"></i> |
| 51 | + </button> |
| 52 | + </h2> |
15 | 53 | foreach (var guideline in group) |
16 | 54 | { |
17 | 55 | <div> |
|
0 commit comments