public static SPCCommandbase[] GetCommandArray() { var properties = typeof(SPCCommand).GetProperties(System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public); int count = properties.Length; var result = new SPCCommandbase[count]; for (int i = 0; i < count; i++) { result[i] = (SPCCommandbase)properties[i].GetValue(null, null); } return result; }
public static SPCCommandbase[] GetCommandArray() { var properties = typeof(SPCCommand).GetProperties(System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public); int count = properties.Length; var result = new SPCCommandbase[count]; for (int i = 0; i < count; i++) { result[i] = (SPCCommandbase)properties[i].GetValue(null, null); } return(result); }