A
Anatoly
Hi. I wonder if someone could explain why this code gives different results
in VB.NET and C#:
C#
public enum myEnum{
One = 1,
Two = 2
}
public void Foo(){
MessageBox.Show(Convert.ToString(myEnum.One));
}
The result of Foo is message 'One'
VB.NET
public enum myEnum
One = 1
Two = 2
end enum
public sub Foo()
MessageBox.Show(Convert.ToString(myEnum.One))
end sub
The result of Foo is message '1'
Thanks
in VB.NET and C#:
C#
public enum myEnum{
One = 1,
Two = 2
}
public void Foo(){
MessageBox.Show(Convert.ToString(myEnum.One));
}
The result of Foo is message 'One'
VB.NET
public enum myEnum
One = 1
Two = 2
end enum
public sub Foo()
MessageBox.Show(Convert.ToString(myEnum.One))
end sub
The result of Foo is message '1'
Thanks