Included closing brace in code sample (#4569)

* Used an explicit code sample rather than a snippet.

The snippet is from a larger class, this modification allows it to be copied and build without modification.

* Included closing brace in link to example as suggested
pull/4572/head
Richard D 2017-10-13 22:06:17 +01:00 committed by Scott Addie
parent 912a1efc8f
commit 8f4d4fad1c
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ Session is accessed through the `Session` property on `HttpContext`. This proper
The following example shows setting and getting an int and a string:
[!code-csharp[Main](app-state/sample/src/WebAppSession/Controllers/HomeController.cs?name=snippet1)]
[!code-csharp[Main](app-state/sample/src/WebAppSession/Controllers/HomeController.cs?range=8-27,49)]
If you add the following extension methods, you can set and get serializable objects to Session: