c# cannot be referenced from a static function -
c # newbie here.
It seems that this user has given me a very good solution to my problem:
But I have no clue how he suggests Gave. Can you please help?
This will compile properly, you will definitely have to give thePort
.
Namespace csWinFormsTest {public partial class} form 1: form {static system. Io Ports Prime port; Port; Public Form 1 () {Initialization (); ThePort = New System. IO.Ports.SierialPort ("COM1"); } Static zero fcn () {MessageBox.Show (thePort.PortName); }}}
Comments
Post a Comment