Skip to content

Commit e4b79ad

Browse files
adjust
1 parent 80bc356 commit e4b79ad

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

1.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,11 @@ public class Factory
196196
{
197197
return Cache<T>.Instance;
198198
}
199-
199+
200200
private static class Cache<T>
201201
where T : new()
202202
{
203-
public static readonly T Instance = new T();
203+
public static readonly T Instance = new();
204204
}
205205
}
206206
```
@@ -215,12 +215,12 @@ public class Factory
215215
{
216216
return Cache<T>.Instance;
217217
}
218-
218+
219219
private static class Cache<T>
220220
where T : new()
221221
{
222222
public static readonly T Instance = CallExpensiveMethodToBuildANewInstance();
223-
223+
224224
private static T CallExpensiveMethodToBuildANewInstance()
225225
{
226226
// Imagine a really complex process to construct T

0 commit comments

Comments
 (0)