algorithms c/c++ c# C Bit fields in C# Feb 25, 2011 See the question and my original answer on StackOverflow Are you looking for the FieldOffset attribute? See here: FieldOffsetAttribute Class