P
Peter Oliphant
OK, I'm mixing old style with new style, so sue me... : )
Will under old syntax, I'm able to create a SerialPort instance. But, when I
try to convert the Parity proerty to a String*, I get the following compiler
error:
error C3610: value type must be 'boxed'
Here is the code:
SerialPort* port = new SerialPort() ;
Parity parity = port->Parity() ;
String* port_str = parity.ToString() ; // 'boxing' error
Never 'boxed' before, don't know how. How do I convert Parity to a String*
equivalent (i.e., how do I change the above code to properly box 'parity' so
ToString() can be evaluated)? If I write the equivalent code in /clr format
no boxing is necessary ('natch), but I need to do this (for now) in old
syntax.
Thanks in advance for responses! : )
[==P==]
PS - I'm writnig a home project using the new /clr syntax. If you START
using this syntax its awesome! If you have to convert old syntax managed C++
to it, its an intimidating task to say the least... : )
Will under old syntax, I'm able to create a SerialPort instance. But, when I
try to convert the Parity proerty to a String*, I get the following compiler
error:
error C3610: value type must be 'boxed'
Here is the code:
SerialPort* port = new SerialPort() ;
Parity parity = port->Parity() ;
String* port_str = parity.ToString() ; // 'boxing' error
Never 'boxed' before, don't know how. How do I convert Parity to a String*
equivalent (i.e., how do I change the above code to properly box 'parity' so
ToString() can be evaluated)? If I write the equivalent code in /clr format
no boxing is necessary ('natch), but I need to do this (for now) in old
syntax.
Thanks in advance for responses! : )
[==P==]
PS - I'm writnig a home project using the new /clr syntax. If you START
using this syntax its awesome! If you have to convert old syntax managed C++
to it, its an intimidating task to say the least... : )