|
namespace CSenum
{
public partial class
CSenum
{
public enum UserEnum
{
Abe
,
Bob
,
Cat
,
Deb
}
public struct
Message
{
public UserEnum From ;
public string Text ;
}
[System.STAThreadAttribute]
public static int
Main
(
string[] args
)
{
try
{
if ( args.Length > 0 )
{
Message m ;
m.From = UserEnum.Bob ;
m.Text = args [ 0 ] ;
System.Console.WriteLine ( "{0} says \"{1}\"" , (int) m.From , m.Text ) ;
System.Console.WriteLine ( "{0} says \"{1}\"" , m.From , m.Text ) ;
}
}
catch ( System.Exception err )
{
System.Console.Write ( err.Message ) ;
}
return ( 0 ) ;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.