0

I'm trying to use the method 'SendSoporteMail' to send an email. This method is in another project called 'BCR.System', in the SMTSenderSimple.cs controller within the static MailServer class.

BCR.System > Comunication > SmtpSenderSimple.cs

In my current project I wrote this, but is giving me the title's error.

        var MailController = new BCR.System.Communication.MailServer();
        MailController.SendSoporteMail("mailto@gmail.com", "Invitation", Body );
Franco Hauva
  • 51
  • 1
  • 6
  • 3
    Yeah, you can't create instances of static classes (that's kind of the point of them). Perhaps you want `BCR.System.Communication.MailServer.SendSoporteMail` – ProgrammingLlama Mar 03 '22 at 01:51
  • Does this answer your question? [Why we cannot create the Instance of the Static Class in .Net](https://stackoverflow.com/questions/19444155/why-we-cannot-create-the-instance-of-the-static-class-in-net) – Yong Shun Mar 03 '22 at 01:57
  • Thank you! , I struggle with static classes and methods. – Franco Hauva Mar 03 '22 at 02:00

0 Answers0