public void AddTempla(CLNBTN_Tp Datum) { // Método para asignar un único template al arreglo de la clase try { if (_st_Lic.Length == 0) { MessageBox.Show("Invalid Lic To work"); } else { CLNBTN_Tp[] stmps = new CLNBTN_Tp[_Templa.Length]; System.Array.Copy(_Templa, 0, stmps, 0, _Templa.Length); _Templa = new CLNBTN_Tp[_Templa.Length + 1]; System.Array.Copy(stmps, 0, _Templa, 0, stmps.Length); _Templa[_Templa.Length - 1] = Datum; } } catch (System.AccessViolationException ex_0) { _Obj_Log.setOutFileLog(true); _Obj_Log.WriteOutErrorMessage(_st_Relac, _st_RelacSon, "AddTempla", "", "System.AccessViolationException: " + ex_0.Message, "", ""); } catch (ArgumentNullException e) { _Obj_Log.setOutFileLog(true); _Obj_Log.WriteOutErrorMessage(_st_Relac, _st_RelacSon, "AddTempla", "", "ArgumentNullException: " + e.Message, "", ""); } catch (RankException e) { _Obj_Log.setOutFileLog(true); _Obj_Log.WriteOutErrorMessage(_st_Relac, _st_RelacSon, "AddTempla", "", "RankException: " + e.Message, "", ""); } catch (ArrayTypeMismatchException e) { _Obj_Log.setOutFileLog(true); _Obj_Log.WriteOutErrorMessage(_st_Relac, _st_RelacSon, "AddTempla", "", "ArrayTypeMismatchException: " + e.Message, "", ""); } catch (InvalidCastException e) { _Obj_Log.setOutFileLog(true); _Obj_Log.WriteOutErrorMessage(_st_Relac, _st_RelacSon, "AddTempla", "", "InvalidCastException: " + e.Message, "", ""); } catch (ArgumentOutOfRangeException e) { _Obj_Log.setOutFileLog(true); _Obj_Log.WriteOutErrorMessage(_st_Relac, _st_RelacSon, "AddTempla", "", "ArgumentOutOfRangeException: " + e.Message, "", ""); } catch (Exception ex_1) { _Obj_Log.setOutFileLog(true); _Obj_Log.WriteOutErrorMessage(_st_Relac, _st_RelacSon, "AddTempla", "", "ArgumentOutOfRangeException: " + ex_1.Message, "", ""); } }