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:
Bruno da Silva Belo 2019-10-25 13:57:48 -03:00 committed by Lauro Moura
parent e17213a09b
commit 5844ab4320
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}