object of class enum could not be converted to string code example

object of class enum could not be converted to string

1

1 Example

0
// Requires public declaration of the following type.
// __value enum Servers {Windows=1, Exchange=2, BizTalk=3};
Servers myServer = Servers::Exchange;
String^ myServerString = "BizTalk";
Console::WriteLine( TypeDescriptor::GetConverter( myServer )->ConvertTo( myServer, String::typeid ) );
Console::WriteLine( TypeDescriptor::GetConverter( myServer )->ConvertFrom( myServerString ) );
by on

Other Code Examples