December 2018
Intermediate to advanced
416 pages
10h 30m
English
To abstract all the information about the image we want to display, we'll create a class that encapsulates this information. There isn't much information in our Picture class, but it is good coding practice to do this:
public class Picture{ public Uri Uri { get; set; } public string Description { get; set; } public Picture() { Uri = new Uri($"https://picsum.photos/400/400/?random&ts= {DateTime.Now.Ticks}"); var generator = new DescriptionGenerator(); Description = generator.Generate(); }}
The Picture class has two public properties:
Read now
Unlock full access