من یک متد برای ارسال پیامک دارم که در این متد من نیاز به دو خروجی دارم recid و status. در ریترن متد می توانم status را دریافت کنم و برای اسفاده از recid ،فکر کنم باید یک متد دیگر نوشت و آن را در متد اول فراخوانی کرده و آن را مقدار دهی کنم.
مشکل اینجاست که نمی توانم recid را در متد اول مقدار دهی کنم
متد SendSms

public static int SendMessage(string[] NumReseive, string TextMessage, string NumSender, string UserName, string Password)
{
string[] rec = NumReseive;
string txt = TextMessage;
string num = NumSender;
long[] recid = null;
byte[] status = null;
com.Send sms = new com.Send();
int retval = sms.SendSms(UserName, Password, rec, num, txt, false, "", ref recid, ref status);
RecId(recid[0]);
return retval;
}

متد GetDelivery یا همان recid

public static int RecId(long recid)
{
com.Send sms = new com.Send();
int retval = sms.GetDelivery(recid);
return retval;
}

بهترین باشید