Sicuramente la linea

static int CalcolaPotenza(byte espo, byte bp)

dovrebbe essere

static int CalcolaPotenza(byte bp, byte espo)