0
I am creating an instance of a certain class , and it is taking too long to instantiate . Does anyone know how to solve this ? Suddenly the applications took time to instantiate
code of the class that is taking long to start
public class Email
{
public Email()
{
}
string[] auxVerifica;
string email, destinatario, rastreio, tipoObjeto;
String nomeDestinatario;
StringBuilder resultado = new StringBuilder();
public void metodoParaenviarEmail(){}
}
I debugged and it hangs as soon as it gives the new Email command();
Yuri, without chunk of code becomes difficult to help, it can be several reasons, until a connection to the database, would have to investigate what the constructor of the class is doing.
– Pablo Tondolo de Vargas
No. There is no help without relevant information. Show the code, explain better what is expected, what is happening.
– Maniero
That’s it , it doesn’t even start the constructor , it takes from the moment I give the comment Email n = new Email();
– Yuri Ancelmo
I thought it was the constructor , but the constructor is empty , is locking in time to create the same instance
– Yuri Ancelmo
If possible add the code of the Email class to your question
– Pablo Tondolo de Vargas
Ready I added the class code
– Yuri Ancelmo