From 9b340f27f73335ee70421461201fbadcec77e9a8 Mon Sep 17 00:00:00 2001 From: Peter Huene Date: Fri, 24 Jul 2020 21:49:05 -0700 Subject: [PATCH] Update the .NET docs for the current .NET API. (#2069) --- docs/lang-dotnet.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/lang-dotnet.md b/docs/lang-dotnet.md index 60a154b042..6e23544de4 100644 --- a/docs/lang-dotnet.md +++ b/docs/lang-dotnet.md @@ -23,7 +23,7 @@ Next, add a reference to the Wasmtime NuGet package to your project: ```text -$ dotnet add package --version 0.15.0-preview1 wasmtime +$ dotnet add package --version 0.19.0-preview1 wasmtime ``` Copy this example WebAssembly text module into your project directory as `gcd.wat`. @@ -46,10 +46,12 @@ namespace Tutorial { static void Main(string[] args) { - using var host = new Host(); - using var module = host.LoadModuleText("gcd.wat"); + using var engine = new Engine(); + using var module = Module.FromTextFile(engine, "gcd.wat"); + using var host = new Host(engine); using dynamic instance = host.Instantiate(module); + Console.WriteLine($"gcd(27, 6) = {instance.gcd(27, 6)}"); } }