Probably you mean
SerialErrorReceivedEventArgs.EventType
, its type is not string but
System.IO.Ports.SerialError
:
http://msdn.microsoft.com/en-us/library/system.io.ports.serialerrorreceivedeventargs.aspx[
^],
http://msdn.microsoft.com/en-us/library/system.io.ports.serialerrorreceivedeventargs.eventtype.aspx[
^],
http://msdn.microsoft.com/en-us/library/system.io.ports.serialerror.aspx[
^].
So, it could be
System.IO.Ports.SerialError error = e.EventType;
Look, no matter what you want to achieve, it's apparent from your attempt to write code, that it is absolutely useless to write anything at all, at this level of knowledge. You can come back after you read some manual on programming, .NET and language from the very first page and learn how to write basic exercises. Think it would need too much time? But if you don't do it, you can waste a lot more, waste, instead of using time.
—SA