RFID.RFIDInterface.PacketData.Find_String_Length C# (CSharp) Method

Find_String_Length() private static method

private static Find_String_Length ( PacketBase body, System info ) : int
body PacketBase
info System
return int
        private static int Find_String_Length(PacketBase body, System.Reflection.FieldInfo info)
        {
            switch (info.DeclaringType.Name)
            {
            case "rfidError":
                switch (info.Name)
                {
                //				case "reason":
                //					return ((Greenwater.rfidError)body).reasonlen;

                default:
                    throw new rfidInvalidPacketException(String.Format("Cannot find the string length of {0}.{1}.", info.DeclaringType.Name, info.Name));
                }

            default:
                throw new rfidInvalidPacketException(String.Format("Cannot find the length of strings in {0}.", info.DeclaringType.Name));
            }
        }