You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using Newtonsoft.Json;
-
- namespace HealthMonitor.Core.Common.Extensions
- {
- public static class ObjectExt
- {
- public static T DeepClone<T>(this object obj) where T : class
- {
- var jsonStr = JsonConvert.SerializeObject(obj);
- return JsonConvert.DeserializeObject<T>(jsonStr);
- }
- }
- }
|