mCore™ .NET SMS Library 1.2

mCore.GeneralException Class

Description:

The mCore.GeneralException is thrown for all general and serial communication related exceptions/errors.

Namespace: mCore
Assembly: mCoreLib (in mCoreLib.dll)
Inherits: System.Exception

Usage Example:

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

   Public Sub ModemConnect()
      Try
         objSMS.Port = "COM1"
         objSMS.BaudRate = mCore.SMS.EnumBaudRate.BaudRate_19200
         objSMS.DataBits = mCore.SMS.EnumDataBits.Eight
         objSMS.StopBits = mCore.SMS.EnumStopBits.One
         objSMS.Parity = mCore.SMS.EnumParity.None
         objSMS.FlowControl = mCore.SMS.EnumFlowControl.RTS_CTS
         objSMS.Connect()

      Catch ex As mCore.GeneralException
         MsgBox(ex.Message, MsgBoxStyle.Critical, "mCore Demo")

      Catch ex As Exception

      End Try
   End Function
End Class
 
C#
class MyClass
{
   public mCore.SMS objSMS = new mCore.SMS();
   public static void ModemConnect()
   {
      try
      {
         objSMS.Port = "COM1";
         objSMS.BaudRate = mCore.SMS.EnumBaudRate.BaudRate_19200;
         objSMS.DataBits = mCore.SMS.EnumDataBits.Eight;
         objSMS.StopBits = mCore.SMS.EnumStopBits.One;
         objSMS.Parity = mCore.SMS.EnumParity.None;
         objSMS.FlowControl = mCore.SMS.EnumFlowControl.RTS_CTS;
         objSMS.Connect();
      }

      catch (mCore.GeneralException e)
      {
         MessageBox.Show(e.ToString());
      }
      catch (Exception e)
      {
      }
   }
}

See Also:

mCore.SMSDeleteException Class
mCore.SMSReadException Class
mCore.SMSSendException Class
mCore.vCalendarException Class
mCore.vCardException Class
mCore.WapPushException Class

 

Copyright © IG Logix Softech Pvt Ltd, All Rights Reserved