cus end
This commit is contained in:
12
TaxPayerFull/Services/ExMethod.cs
Normal file
12
TaxPayerFull/Services/ExMethod.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Front.Services
|
||||
{
|
||||
public static class ExMethod
|
||||
{
|
||||
public static T Clone<T>(this T obj)
|
||||
{
|
||||
var inst = obj.GetType().GetMethod("MemberwiseClone", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
|
||||
|
||||
return (T)inst?.Invoke(obj, null);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user