Skip to content

Commit 34f468a

Browse files
paulomorgadomairaw
andauthored
Add information about when the target is considered not initialized when using an overload that doesn't provide the initialized flag (#3446)
* Add information about when the target is considered not initialized when using an overload that doesn't provide the initialized flag. * Added clarification for when it's considered initialized or not. * Update xml/System.Threading/LazyInitializer.xml Co-Authored-By: Maira Wenzel <[email protected]> * Update xml/System.Threading/LazyInitializer.xml Co-Authored-By: Maira Wenzel <[email protected]> Co-authored-by: Maira Wenzel <[email protected]>
1 parent d69adb4 commit 34f468a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xml/System.Threading/LazyInitializer.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ ExpensiveData dataToUse = LazyInitializer.EnsureInitialized(ref _data, ref _data
116116
</Parameters>
117117
<Docs>
118118
<typeparam name="T">The type of the reference to be initialized.</typeparam>
119-
<param name="target">A reference to initialize if it has not already been initialized.</param>
119+
<param name="target">A reference to initialize if it has not already been initialized. If it is <see langword="null" />, it is considered not initialized; otherwise, it's considered initialized.</param>
120120
<summary>Initializes a target reference type with the type's parameterless constructor if it hasn't already been initialized.</summary>
121121
<returns>The initialized object.</returns>
122122
<remarks>
@@ -295,7 +295,7 @@ ExpensiveData dataToUse = LazyInitializer.EnsureInitialized(ref _data, ref _data
295295
</Parameters>
296296
<Docs>
297297
<typeparam name="T">The type of the reference to be initialized.</typeparam>
298-
<param name="target">A reference to initialize if it has not already been initialized.</param>
298+
<param name="target">A reference to initialize if it has not already been initialized. If it is <see langword="null" />, it is considered not initialized; otherwise, it's considered initialized.</param>
299299
<param name="syncLock">A reference to an object used as the mutually exclusive lock for initializing
300300
<paramref name="target" />. If <paramref name="syncLock" /> is <see langword="null" />, a new object will be instantiated.</param>
301301
<param name="valueFactory">The method to invoke to initialize <paramref name="target" />.</param>

0 commit comments

Comments
 (0)