Need to run a c# dll from the command line

后端 未结 4 867
日久生厌
日久生厌 2020-12-03 14:51

I have a c# dll defined like this:

namespace SMSNotificationDll
{
    public class smsSender
    {
        public void SendMessage(String number, String mess         


        
4条回答
  •  春和景丽
    2020-12-03 15:39

    Why don't you just create a simple console application which refers to the DLL as a class library?

    namespace SMSNotificationDll
    {
        public class SmsSenderProgram
        {
            public static void Main(string[] args)
            {
                // TODO: Argument validation
                new smsSender().SendMessage(args[0], args[1]);
            }
        }
    }
    

    Btw, I'd rename smsSender to something like SmsSender.

提交回复
热议问题