forked from enlightenment/efl
csharp:Using Array.Empty genericmodel.
Summary: ref T8421 Reviewers: lauromoura, felipealmeida, YOhoho, segfaultxavi Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8421 Differential Revision: https://phab.enlightenment.org/D10501
This commit is contained in:
parent
e17213a09b
commit
5844ab4320
|
@ -124,7 +124,7 @@ public class GenericModel<T> : Efl.Object, Efl.IModel
|
|||
if (v.GetValueType().IsContainer())
|
||||
{
|
||||
var child = (Efl.IModel)v[0];
|
||||
T obj = (T)Activator.CreateInstance(typeof(T), new System.Object[] {});
|
||||
T obj = (T)Activator.CreateInstance(typeof(T), Array.Empty<object>());
|
||||
ModelHelper.GetProperties(obj, child);
|
||||
return obj;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue