 Hello there and welcome back to the second part of this video where we are learning about lazy class of C sharp. Now let's talk about multi-threaded environment. Do you think object which created with lazy class is thread safe? What if multiple threads are racing it to initialize it? Well, the answer is object created with lazy class are thread safe. Let's see this practically. Now here I have defined one static method get object value which accept lazy object as input parameter and then we creating the actual object by accessing this value property of this lazy object and writing out the object information in the console window. So here I have initialized the lazy object and then there are three separate threads which will execute this get object value method and trying to create this object by accessing this value property. So we should get this message in the console three times. So let's run this application and see the behavior. So as you can see here that constructor called for one times and this method is called three times and print this information. So we can change this thread behavior by passing the another lazy thread safety mode which has three options. So the first one is execution and publication. So the meaning of this option is only one concurrent thread will attempt to create the underlying value and on successful creation all waiting thread will receive the same value which we have already seen earlier and another option is publication only. This means when multiple concurrent thread will attempt to create the underlying value it allows all the threads to run the initialization method. So now let's pass this parameter and observe the difference. So now here you can see that with this option the constructor of the class is called three times that means using this option it allows all the threads to run the initialization method. Now what if I select the none option? So as its name suggests this is not a thread safe. So when I select this option and run this app. So now I'm getting the exception. So this means that this none option will allow only one thread to initialize this lazy object. Now let's move on and see how lazy class can catch the exception that are thrown from the initialization.