Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lofcz authored Jan 23, 2025
1 parent b80104d commit 11cf35b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@ using FastCloner.Code;
var clone = FastCloner.DeepClone(new { Hello = "world", MyList = new List<int> { 1 } });
```

**That's it!** _Feel free to map this method to your extension so if you need to migrate in the future it's a matter of just switching that method. We intentionally don't ship our own `.DeepClone()` extension method._
**That's it!** _Feel free to map this method to your extension so if you need to migrate in the future it's a matter of just switching that method. We intentionally don't ship our own `.DeepClone()` extension method. If you don't have one yet, just copy this into your project:_

```cs
[return: NotNullIfNotNull(nameof(obj))]
public static T? DeepClone<T>(this T? obj)
{
return FastCloner.FastCloner.DeepClone(obj);
}
```

## Advanced usage

Expand Down

0 comments on commit 11cf35b

Please sign in to comment.