How do you use the Lazy<T> class to implement lazy initialization in a thread-safe manner in C#?
Lazy initialization is a technique that delays the creation of an object or a value until it is first accessed or needed. This can improve performance and memory usage, especially for expensive or rarely used resources. However, lazy initialization can also introduce concurrency issues, such as race conditions or stale data, if multiple threads access the same lazy instance. How do you use the Lazy<T> class to implement lazy initialization in a thread-safe manner in C#?