Skip to content

AlexHedley/dotnetbyexample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.NET By Example

.NET C# F# VB.NET License: MIT Dependabot Dependency-Check

Dependabot Updates Dependency Check

Content and build toolchain for .NET by Example, a site that teaches .NET (C#, F#, VB.NET) via annotated example programs/scripts.

Overview

The .NET by Example site is built by extracting code and comments from source files in examples and rendering them using templates into a static public directory. The programs implementing this build process are in tools, along with dependencies specified in the .csproj.

The built public directory can be served by any static content system. The production site uses GitHub Pages, for example - https://alexhedley.github.io/dotnetbyexample/.

Inspired by Go by Example (Source)

examples

A 📂 folder containing a .csx, .vb, .fs (and .bat with run instructions) file complete with code and code comments is converted to a corresponding .html file.

Please raise a new 💡Discussion with any ideas for another example, then MRs are welcome :).

src

build

cd src

dotnet build --configuration Release

run

Locally

dotnet run --project src/dotnetbyexample/dotnetbyexample.csproj

src\dotnetbyexample\bin\Release\net9.0\dotnetbyexample.exe

docs

Dependencies

If you wish to run the examples locally you can use dotnet script, although see Announcing dotnet run app.cs – A simpler way to start with C# and .NET 10 and I will update the scripts over time.

dotnet script

https://github.com/dotnet-script/dotnet-script

dotnet tool install -g dotnet-script

dotnet tool list -g

dotnet tool uninstall dotnet-script -g

Contributors 3

  •  
  •  
  •