I'm following the example.
But in this line VS cant find the namespace Esri.ArcGISRuntime.Layers.
Esri.ArcGISRuntime.Layers.ArcGISTiledMapServiceLayer myArcGISTiledMapServiceLayer = new Esri.ArcGISRuntime.Layers.ArcGISTiledMapServiceLayer();
And as you can see there isn't any Layers on ArcGISRuntime
My assumption is that you are trying to use 10.2.X sample code with 100.X runtime install and since the APIs are different, you cannot find the correct layers.
See 100.X samples and documentation for help
You are correct. But I believe the example could be more clear on what version was referring too.
I will recommend something similar as PostgreSQL page. Where you have clearly on the header what version is the content and a link to the most recent version of the same content.
We also have this migration topic that might be useful in finding the correct namespace and class names Migrate from 10.2.x to 100.x—ArcGIS Runtime SDK for .NET (WPF) | ArcGIS for Developers
If you already know the new class name, you can also just hit "CTRL" + "." keys on Visual Studio to resolve the namespace.