Why is the strong conversion of this byte ineffective? Shouldn't the result be 1
using System; using System.IO; namespace HelloWorldApplication { public enum XType : byte { T } class HelloWorld { static void Main(string[] args) { byte[] k = BitConverter.GetBytes((byte)XType.T); Console.WriteLine(k.Length); Console.ReadKey(); } } }
Solved, actually using GetBytes (short) instead of GetBytes (byte) function