Markdown
Code and Commands
Using code and commands
Basic markdown structure
We can use the basic structure of a code block
Console.WriteLine("Hello World!");![]() |
Code with a title
We can add a title to our code block to reference a specific file.
public void Main(){ Console.WriteLine("Test");}![]() |
Terminal Frame
We can build a structure that resembles a terminal frame to show a specific terminal command.
dotnet --version![]() |
Adding Labels
We can add extra information to our code to help highlight things
Default highlight
// Value input waiting for the user
Console.Write("Enter a value from 0 to 10: ");
string input = Console.ReadLine();![]() |
Deletion highlight
We can show a specific value that was or should be removed:
using System;
namespace TestProcess{ public class Program { public static void Main(string[] args) { //... } }}![]() |
Insertion highlight
We can show a specific value that was or should be added:
using System;
namespace TestProcess{ public class Program { public static void Main(string[] args) { //... } }}![]() |
Highlighting a specific word
We can highlight a specific word in the text by placing it in a list.
using System.ComponentModel.DataAnnotations;
namespace MinimalAPI.Models{ public class Product { public Product() { }
[Key] public long Id { get; set; }
[StringLength(50)] [Required] public required string Name { get; set; }
[Range(0, double.MaxValue)] [Required] public double Price { get; set; } }}![]() |






