private static void writeEnumInt(BinaryRawWriter w,Enum e){
  w.writeInt(e == null ? 0 : e.ordinal());
}

private static void writeEnumInt ( BinaryRawWriter w , Enum e ) { w . writeInt ( e == null ? 0 : e . ordinal ( ) ) ; }
writes enum as int .
