Enum comparison not working.
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
public enum TagLabels : uint
{
TurnLeft = 0x0000000000000000000030A38DB1,
TurnRight = 0x00000000000000000000307346CC,
LiftApproach = 0x0000000000000000000012107A8D
}
static void Main(string[] args)
{
TagLabels friend;
string Tag = TagLabels.TurnRight.ToString();
string actual, returned;
actual = "0x0000000000000000000012107A8D";
returned = "0x0000000000000000000012107A8D";
if (actual == TagLabels.LiftApproach.ToString() )
Console.WriteLine("equivalent");
friend = (TagLabels)Enum.Parse(typeof(TagLabels), actual);
Console.Write("Attempting to convert: ");
Console.WriteLine(actual);
Console.Read();
}
}
}
Can some one tell me what's wrong with the section in bold please?
I have no idea why it wont work.