I have a private method that I need to get its MethodInfo inside a PCL code.
this.GetType().GetTypeInfo().GetDeclaredMethods("ToNullableDouble").First(m=>m.IsStatic && m.IsPrivate)
Above code doesn't work because GetDeclaredMethods returns only public methods.
Aucun commentaire:
Enregistrer un commentaire