The ErrorCode property gets the error code if an error occurred
during the last method call or property read/write. If no error occurred then it
returns the value 0.
Namespace: mCore
Assembly: mCoreLib (in mCoreLib.dll)
| Visual Basic |
| Public Class MyClass Public WithEvents objSMS As New mCore.SMS Public Sub ModemConnect() Dim strError As String Try strError = "ERROR " & objSMS.ErrorCode.ToString() & ": " & objSMS.ErrorDescription MsgBox(strError,
MsgBoxStyle.Critical, "mCore Demo") |
| 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) |
mCore.SMS.ErrorDescription Property
mCore.SMS.DebugMode Property
mCore.SMS.LogType Property
mCore.SMS.IsError Method