Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/10/2014, 09:08
Avatar de ras_chalo
ras_chalo
 
Fecha de Ingreso: junio-2010
Mensajes: 369
Antigüedad: 13 años, 10 meses
Puntos: 6
Pregunta porque mi variable tiene valor 0?

hola a todos, saben que tengo el siguiente código que no me funciona, la variable myArrayMethodInfo.Length tiene valor 0 y no sé porque...


Código C++:
Ver original
  1. int largoMetodo;
  2. Type myType = (typeof(WSplataforma));
  3. MethodInfo[] myArrayMethodInfo = myType.GetMethods(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly);
  4. largoMetodo = myArrayMethodInfo.Length;
  5.  
  6.                    for (g = 0; g < largoMetodo; g++)
  7.                         {
  8.                             MethodInfo myMethodInfo = myArrayMethodInfo[g];
  9.                             Console.WriteLine("\nThe name of the method is {0}.", myMethodInfo.Name);
  10.                         }

alguna idea?
desde ya muchas gracias por su tiempo amigos,
Saludos!

Última edición por ras_chalo; 28/10/2014 a las 09:14