mCore™ .NET SMS Library 1.2

mCore.SMS.ErrorDescription Property

Description:

The ErrorDescription property gets a string value with the description of the corresponding error code that is returned by ErrorCode property. This property is meaningful only if IsError method returns True (i.e. ErrorCode property contains a non-zero value).

Namespace: mCore
Assembly: mCoreLib (in mCoreLib.dll)

Exceptions:

mCore.GeneralException

Usage Example:

Visual Basic
Public Class MyClass
   Public WithEvents objSMS As New mCore.SMS

   Public Sub ModemConnect()
      Dim strError As String

      Try
         objSMS.DebugMode = True
         objSMS.Port = "COM1"
         objSMS.BaudRate = mCore.BaudRate.BaudRate_19200
         objSMS.DataBits = mCore.DataBits.Eight
         objSMS.StopBits = mCore.StopBits.One
         objSMS.Parity = mCore.Parity.None
         objSMS.FlowControl = mCore.FlowControl.RTS_CTS
         objSMS.Connect()

      Catch ex As mCore.GeneralException

      Catch ex As Exception

      End Try

      If objSMS.IsError() Then

         strError = "ERROR " & objSMS.ErrorCode.ToString() & ": " & objSMS.ErrorDescription

         MsgBox(strError, MsgBoxStyle.Critical, "mCore Demo")
      End If

   End Function
End Class

 
C#
class MyClass
{
   public mCore.SMS objSMS = new mCore.SMS();
   public static void ModemConnect()
   {
      string strError = "";
      try
      {
         objSMS.DebugMode = true;
         objSMS.Port = "COM1";
         objSMS.BaudRate = mCore.BaudRate.BaudRate_19200;
         objSMS.DataBits = mCore.DataBits.Eight;
         objSMS.StopBits = mCore.StopBits.One;
         objSMS.Parity = mCore.Parity.None;
         objSMS.FlowControl = mCore.FlowControl.RTS_CTS;
         objSMS.Connect();
      }

      catch (mCore.GeneralException e)
      {
      }
      catch (Exception e)
      {
      }

      If (objSMS.IsError())
      {
         strError = "ERROR " + objSMS.ErrorCode.ToString() + ": " + objSMS.ErrorDescription;
         MessageBox.Show(strError);
      }
   }
}

See Also:

mCore.SMS.ErrorCode Property
mCore.SMS.DebugMode Property
mCore.SMS.LogType Property
mCore.SMS.IsError Method

 

Copyright © IG Logix Softech Pvt Ltd, All Rights Reserved